Forums / Developer / How can this php code in template code ?! / Comment38484
Selmah Maxim
Thursday 31 July 2003 7:34:07 am
The idea of this to load random image or random template !Not sure but maybe will work this way :
{let sec=$date|datetime(custom,"%i") } {section show=mod($sec,2)} {include uri="layout1.tpl"} {section-else show=mod($sec,4)} {include uri="layout2.tpl"} {section-else show=mod($sec,6)} {include uri="layout3.tpl"} {section-else show=mod($sec,8)} {include uri="layout4.tpl"} {section-else} {include uri="layout4.tpl"}{/section}
So, this code should be in your design/templates/pagelayout.tpl
I cann`t test now, but what you think ?!