Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2020-12-05 15:39:00

singaz
Member
Registered: 2017-03-12
Posts: 150

Re: Auto-rotation of the skin layer of themes by dates/season/holidays?

New Years is soon.

My way to automatically change greeting text every day. Or an interval of days.

<txp:evaluate query="20201204 <= date('Ymd') and  date('Ymd') <= 20201231">
Image marked with desire 2020 Happy New Year
</txp:evaluate>
<txp:evaluate query="20201204 <= date('Ymd') and  date('Ymd') <= 20201205">
Congratulation in the outgoing year №1
</txp:evaluate>
<txp:evaluate query="20201206 <= date('Ymd') and  date('Ymd') <= 20201208">
Congratulation in the outgoing year №2
</txp:evaluate>

…..

<txp:evaluate query="20210101 <= date('Ymd') and  date('Ymd') <= 20210131">
Image marked with desire 2021 Happy New Year
</txp:evaluate>
<txp:evaluate query="20210101 <= date('Ymd') and  date('Ymd') <= 20210105">
Congratulation in the new year №1
</txp:evaluate>

……

Last edited by singaz (2020-12-10 00:58:53)


Sorry my horror English. I’m learning textpattern, I’m learning English

Offline

#26 2020-12-05 15:43:35

singaz
Member
Registered: 2017-03-12
Posts: 150

Re: Auto-rotation of the skin layer of themes by dates/season/holidays?

20201205 <= date(‘Ymd’)

2020 – this is the year
12 – this is the month
05 – this is the day

Last edited by singaz (2020-12-05 15:44:01)


Sorry my horror English. I’m learning textpattern, I’m learning English

Offline

Board footer

Powered by FluxBB