[Zope] Extended use of the calendar tag

Ty Sarna tsarna@endicor.com
23 Apr 1999 15:34:45 GMT


In article <19990423133303.A284@RaVER.duck.org>,
 <raver@box.dust.za.net> wrote:
> If I have this code:
> 
> <!--#calendar mode=month-->
> <A HREF="/some/place/form"><!--#var date fmt=day--></A>
> <!--#/calendar-->
> 
> Then - is there some way that the DTML method 'form' in /some/place/ can pick up what
> 'daylink' that was the caller, or is the only way to transfer variables
> between methods to use forms?

You can pass it as a query string. Something like:

 <!--#calendar mode=month-->
  <A HREF="/some/place/form?date=<!--#var date fmt=spam-->">
   <!--#var date fmt=day-->
  </A>
 <!--#/calendar-->

(where spam is one of the formats that yields YYYY-MM-DD or MM-DD-YYYY
or what have you... I can never remember the date formatting options)

Alternately, with more magic you could include the date as part of the
URL. (/some/place/form/1999-05-14)

> I hope there is a solution to this as it would be fairly simple then to
> create an appointmet calendar kind of thing.

That's exactly the kind of thing it's inteneded for.  The default UI is
a clone of the Palm Pilot Datebook application, actually :-)

P.S. to those of you who sent me mail with questions and enhancements to
the calendar tag... I'm just starting to get myself dug out of a whole
pile of work, so I should be able to hack on Calendar and TinyTables again
soon.