Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
There's more than one way to do things
 
PerlMonks  

Re: Date-sensitive output with Template Toolkit

by nferraz (Monk)
on Apr 05, 2006 at 05:53 UTC ( [id://541325]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Date-sensitive output with Template Toolkit

In my opinion, the most elegant solution would be to take the dates from the template, so you could manage your data elsewhere. For instance:

[% USE MessageOfTheDay %] [% MessageOfTheDay.Message %]

Data file:

New Year's Day *-01-01 April Fools' Day *-04-01 Independence Day *-07-04 Christmas Day *-12-25 Any given week 2006-04-09 2006-04-15

The actual code is left as an exercise for the reader.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://541325]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.