[Zope] Month number as string as variable
peter be
peter@grenna.net
Tue, 1 Aug 2000 14:45:30 +0100
Dear All.
What I want to do is display this months Poll.
I have created three Polls ( from the Poll Product ), named month_06, month_07, month_08.
I understand that I will have to use the getitem() function to "show" the Poll itself, but I don't know how to create the string "month_0X"
<dtml-var "ZopeTime()" fmt="%m"> ...returns (today) '08' Good!
<dtml-let monthnr="ZopeTime()">
<dtml-var monthnr fmt="%m"> ...also returns (today) '08' Good!
</dtml-let>
But I don't want to use the fmt when I display it.
I'd like to have something like this:
<dtml-let monthnr=("ZopeTime()" fmt="%m")> * this is where the problem lies.
<dtml-let monthPoll="'month_'+monthnr">
<dtml-var "_.getitem(monthPoll)">
</dtml-let>
But this obviously, is bad syntax.
(I have tried [] squared brackets as well)
Best Regards, Peter