[Typo3] I need help doing an if-then statement
JoH
info at cybercraft.de
Fri Nov 11 02:11:10 CET 2005
> I keep my TS in the root document of my site. I define a constant in
> an extension template further down the tree. In the TS for the root
> document, I define what to do with that constant. But I want to do
> one thing if the constant is defined, and another thing if it is not.
> In English:
>
> if constant called title-extension has a value
> then subpart.TITLE_EXT.value = {$title-extension}
> if constant called title-extension does not have a value
> then subpart.TITLE_EXT.value = Googly-moogly
Ever thought of defining the constant twice?
In the TS of your rootpage:
CONSTANTS
title-extension = Googly-moogly
SETUP
subpart.TITLE_EXT.value = {$title-extension}
In the TS of your extension template:
CONSTANTS
title-extension = Whatever
This way you don't need any statement at all ...
Joey
--
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your knob sometimes!)
Dieter Nuhr, German comedian
openBC: http://www.openbc.com/go/invuid/Jo_Hasenau
More information about the TYPO3-english
mailing list