Hi All: I'm using the below code to get the year and month of the current date. With that I would like to insert them into my with statement. Can and if so how. <dtml-call "REQUEST.set('year', ZopeTime().strftime('%Y'))"> <dtml-call "REQUEST.set('month', ZopeTime().strftime('%m'))"> <dtml-with "pao.stories.y_("year").m_("month")"> Thanks, Todd
<dtml-with "pao.stories['y_%s' % year]['m_%s' % month]"> ----- Original Message ----- From: "Todd Loomis" <tloomis@dmso.mil> To: <zope@zope.org> Sent: Wednesday, December 05, 2001 4:48 PM Subject: [Zope] Help with Coding
Hi All:
I'm using the below code to get the year and month of the current date. With that I would like to insert them into my with statement. Can and if so how.
<dtml-call "REQUEST.set('year', ZopeTime().strftime('%Y'))"> <dtml-call "REQUEST.set('month', ZopeTime().strftime('%m'))">
<dtml-with "pao.stories.y_("year").m_("month")">
Thanks, Todd
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Todd Loomis writes:
I'm using the below code to get the year and month of the current date. With that I would like to insert them into my with statement. Can and if so how.
<dtml-call "REQUEST.set('year', ZopeTime().strftime('%Y'))"> <dtml-call "REQUEST.set('month', ZopeTime().strftime('%m'))">
<dtml-with "pao.stories.y_("year").m_("month")"> You ask for "Computed Attribute Access".
You can find out about your options in either the mailing list archives or <http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html> Dieter
participants (3)
-
Dieter Maurer -
Phil Harris -
Todd Loomis