[TYPO3] start and stop function typoscript
Bas van der Togt
b.vandertogt at profinit.com
Wed Nov 1 13:48:14 CET 2006
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]
[month = 3] && [dayofmonth > 20] || [month = 4] || [month = 5] || [month
= 6] && [dayofmonth < 21]
temp.Image = IMAGE
temp.Image {
file = fileadmin/templates/images/image_spring.jpg
file.width = 800
file.height = 250
}
[end]
[month = 6] && [dayofmonth > 21] || [month = 7] || [month = 8] || [month
= 9] && [dayofmonth < 22]
temp.Image = IMAGE
temp.Image {
file = fileadmin/templates/images/image_summer.jpg
file.width = 800
file.height = 250
}
[end]
[month = 9] && [dayofmonth > 23] || [month = 10] || [month = 11] ||
[month = 12] && [dayofmonth < 24]
temp.Image = IMAGE
temp.Image {
file = fileadmin/templates/images/image_autumn.jpg
file.width = 800
file.height = 250
}
[end]
cheers,
Bas
Amiran Chyb schreef:
>> Hello list,
>>
>> I want to start and stop a picture of mine every season.
>> Spring has to start 20 th of march and stop 21 th of june for example.
>> What am i doing wrong in the following code:
>>
>> My code:
>> # Image
>> [month = 3] && [dayofmonth = 20]
>> temp.Image = IMAGE
>> temp.Image {
>> file = fileadmin/templates/images/image_spring.jpg
>> file.width = 800
>> file.height = 250
>> }
>> [end]
>
>
> TS will look into those conditions just on those specifig days, on any
> other day none of those conditions will be true.
>
> Shouldn't you use something like:
>
> [month = 3] && [dayofmonth > 20] || [month = 4] || [month = 5] || [month
> = 6] && [dayofmonth < 21]
>
> for spring, and for other months analogically?
>
> Am
More information about the TYPO3-english
mailing list