[TYPO3] Condition in globalVar
Livius Agrippa
livius_agrippa at yahoo.com
Wed Oct 24 17:02:43 CEST 2007
Hi Joey,
Your observation is good and thank you.
But another problem.
This line:
[globalVar = TSFE:id = 2,3,4,5]
doesn't work as it should. All the pages pass this condition.
If I write only one id, the condition works as it should.
I think I should write:
[globalVar = TSFE:id = 2][globalVar = TSFE:id = 3][globalVar = TSFE:id =
4][globalVar = TSFE:id = 5]
but it is not so nice for 20 pages.
regards,
Livius
JoH wrote:
>> 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: |
>> 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: |
>> 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