[TYPO3] Condition in globalVar

JoH info at cybercraft.de
Wed Oct 24 15:53:41 CEST 2007


> I have this code
> temp.LASTUPDATED = TEXT
> temp.LASTUPDATED {
>    data = page:lastUpdated
>    if.isTrue.data = page:lastUpdated
>    strftime = %A, %d. %B %Y
>    wrap =  <hr />Letzte Änderung:&nbsp; |
>    data = register : SYS_LASTCHANGED
>    if >
> }
>
> [globalVar = GP:L = 1]
>   temp.LASTUPDATED = TEXT
>   temp.LASTUPDATED {
>   data = page:lastUpdated
>   if.isTrue.data = page:lastUpdated
>   strftime = %A, %d %B %Y
>   wrap =  <hr />Updated:&nbsp; |
>   data = register : SYS_LASTCHANGED
>   if >
> }
> [global]
>
> How can I specify that on some pages the temp.LASTUPDATE should be
> empty? I tried in this way:
> [globalVar = TSFE:id = 2,3,4,5]
>   temp.LASTUPDATED = TEXT
>   temp.LASTUPDATED.data =
> [global]
>
> But right now it shows Updated: 1 Jan 1970 on all the pages.

Of course it does, since the "value" in this case will be zero and the 
strftime format that remained in the setup will do what it's supposed to.
You have to clear the whole block before setting it to an empty value.

[globalVar = TSFE:id = 2,3,4,5]
    temp.LASTUPDATED >
    temp.LASTUPDATED = TEXT
    temp.LASTUPDATED.value =
[global]

HTH

Joey




More information about the TYPO3-english mailing list