[Typo3] globalVars conditional always executes else block

Dmitry Dulepov typo3 at fm-world.ru
Fri Aug 12 20:19:39 CEST 2005


Hi!

Is your "altImgResource" nested in any TS block? This will not be valid:

x {
[globalVar = TSFE:id = 1]
altImgResource = ...
[else]
altImgResource = ...
[end]
}

More information is here:
http://typo3.org/documentation/document-library/doc_core_ts/Conditions/

You can avoid this problem using:
[globalVar = TSFE:id = 1]
x.altImgResource = ...
[else]
x.altImgResource = ...
[end]

Dmitry.


Brice Ruth wrote:
> Good morning,
> 
> I have the following TS:
> 
> [globalVar = TSFE:id = 1]
> altImgResource = img1.gif || img2.gif || img3.gif || img4.gif
> [else]
> altImgResource = subImg1.gif || subImg2.gif || subImg3.gif || subImg4.gif
> [end]
> 
> But, regardless if I'm on the root-level page w/ ID=1 or not, I'm always 
> getting subImg1 .. 4, what's going on here?
> 



More information about the TYPO3-english mailing list