[Typo3] how to combine two conditions in TypoScript

Michael Scharkow mscharkow at gmx.net
Thu May 5 14:12:43 CEST 2005


Tadej Bregar wrote:

> I tried to combine these two pieces of code somehow but without luck.
> Am I on the right track? How should I formulate my Typoscript to select 
> the right template???

You don't need a condition for the default language, so just redefining 
the two template files for the other language should be enough. The 
following is untested but should work.

plugin.tx_rlmptmplselector_pi1 {
      templatePathMain = fileadmin/templates/main/
      templatePathSub = fileadmin/templates/sub/
      defaultTemplateFileNameMain = other_pages_lang_0.html
      defaultTemplateFileNameSub = first_page_lang_0.html
      inheritMainTemplates = 0
      inheritSubTemplates = 1
}

[globalVar = GP:L = 1]
plugin.tx_rlmptmplselector_pi1 {
	defaultTemplateFileNameMain = other_pages_lang_1.html
	defaultTemplateFileNameSub = other_pages_lang_1.html
}
[global]


Cheers,
Michael



More information about the TYPO3-english mailing list