Hi All, Im trying to display information based on what day of the week it tis using: <dtml-if "date1 == '<dtml-var ZopeTime fmt=Day>'"> The date1 property on the page I'm calling is "Tuesday". It works when i do this: <dtml-if "date1 == 'Tuesday'"> But not with: <dtml-if "date1 == '<dtml-var ZopeTime fmt=Day>'"> (and yes, the day I'm doing it on is Tuesday). Any ideas? Thanks. Tom Scheidt | www.falsemirror.com | tom@falsemirror.com ---------------------------------------------------------------------------- -----------
The python expression syntax strikes again :( Tom Scheidt wrote:
<dtml-if "date1 == '<dtml-var ZopeTime fmt=Day>'">
You're trying to embed DTML within python here. you really want (untested): <dtml-if "date1 == _DateTime.now().Day()"> cheers, Chris
Chris Withers wrote:
The python expression syntax strikes again :(
Tom Scheidt wrote:
<dtml-if "date1 == '<dtml-var ZopeTime fmt=Day>'">
You're trying to embed DTML within python here.
you really want (untested):
<dtml-if "date1 == _DateTime.now().Day()">
Close but no brownies for you. :-) Make that... <dtml-if "date1 == _.DateTime().Day()"> Shane
participants (3)
-
Chris Withers -
Shane Hathaway -
Tom Scheidt