[TYPO3] start and stop function typoscript
Bas van der Togt
b.vandertogt at profinit.com
Wed Nov 1 15:13:42 CET 2006
Now i tried this, but it's also not working.
The third month of every season does not work.
Amy other suggestions?
# Image
temp.Image = IMAGE
temp.Image {
file.width = 800
file.height = 250
alttext = WYTCH HOUSE Country Decorations
}
# Winter
[month = 12] && [dayofmonth > 20] || [month = 1]
temp.Image.file = fileadmin/templates/images/image_winter.jpg
[end]
[month = 2] || [month = 3] && [dayofmonth < 21]
temp.Image.file = fileadmin/templates/images/image_winter.jpg
[end]
# Spring
[month = 3] && [dayofmonth > 19] || [month = 4]
temp.Image.file = fileadmin/templates/images/image_spring.jpg
[end]
[month = 5] || [month = 6] && [dayofmonth < 22]
temp.Image.file = fileadmin/templates/images/image_spring.jpg
[end]
# Summer
[month = 6] && [dayofmonth > 20] || [month = 7]
temp.Image.file = fileadmin/templates/images/image_summer.jpg
[end]
[month = 8] || [month = 9] && [dayofmonth < 24]
temp.Image.file = fileadmin/templates/images/image_summer.jpg
[end]
# Autumn
[month = 9] && [dayofmonth > 22] || [month = 10]
temp.Image.file = fileadmin/templates/images/image_autumn.jpg
[end]
[month = 11] || [month = 12] && [dayofmonth < 22]
temp.Image.file = fileadmin/templates/images/image_autumn.jpg
[end]
Amiran Chyb schreef:
>> The first two months of every season are working now, but the last
>> month not. Do you know why?
>>
>> My code now:
>>
>> # Image
>> [month = 12] && [dayofmonth > 21] || [month = 1] || [month = 2] ||
>> [month = 3] && [dayofmonth < 22]
>> temp.Image = IMAGE
>> temp.Image {
>> file = fileadmin/templates/images/image_winter.jpg
>> file.width = 800
>> file.height = 250
>> }
>> [end]
>
>
>
> I'm not sure, maybe something with TS parsing of composite conditions.
>
> you can try, as a debug/workaround, to expand them to smaller ones, or
> even to single conditions. it would be an equivalent to composite
> disjunction ( ... || ... || ... || ... )
>
> Did you play with 'set conditions' in TS object browser?
>
> eg.:
>
> temp.Image = IMAGE
> temp.Image {
> file.width = 800
> file.height = 250
> }
>
> [month = 12] && [dayofmonth > 21] || [month = 1]
> temp.Image.file = fileadmin/templates/images/image_winter.jpg
> [end]
>
> [month = 2] || [month = 3] && [dayofmonth < 21]
> temp.Image.file = fileadmin/templates/images/image_winter.jpg
> [end]
>
> [month = 3] && [dayofmonth > 20]
> temp.Image.file = fileadmin/templates/images/image_spring.jpg
> [end]
>
> [month = 4]
> temp.Image.file = fileadmin/templates/images/image_spring.jpg
> [end]
>
>
>
More information about the TYPO3-english
mailing list