Gossamer Forum
Home : Products : Links 2.0 : Customization :

dated templates

Quote Reply
dated templates
Hi,
In order to have a different homepage template every day,
i have 365 different templates ('01_01.html','01_02.html', ..., '12_30.html','12_31.html')
and i wrote that code in 'templates > home.html':

<%if date eq "1-Jan-2004"%><%include 01_01.html%><%endif%>
<%if date eq "2-Jan-2004'%><%include 01_02.html%><%endif%>
<%if date eq "3-Jan-2004"%><%include 01_03.html%><%endif%>
<%if date eq "4-Jan-2004"%><%include 01_04.html%><%endif%>
<%if date eq "5-Jan-2004"%><%include 01_05.html%><%endif%>
<%if date eq "6-Jan-2004"%><%include 01_06.html%><%endif%>
etc ...

but actually, the coding is long (from 1-Jan to 31-Dec)
and it is heavy for Cron running everyday.


The ideal would be to write in 'home.html' a kind of code like this:
<%include DAY-MONTH.html%>

But i don't have any skill in Perl programing.

Has anyone got an idea ?