[Zope-CMF] Calendar / Schedule within CMF
Juan David Ibáñez Palomar
palomar@sg.uji.es
Fri, 25 May 2001 16:50:03 +0200 (METDST)
>
> Hello,
>
> I am hoping someone to help me understand several areas from this, little
> problem I am having.
>
> I have setup the http://www.zope.org/Members/judell/CalendarTagExample and
> would like to included within the CMF site.
>
> Now I am looking to create a Portal_Type - called Event - which will allow
> Members to add events to the Calender and be able to refer back to it.
>
> My problem here is that I don't understand the following lines from the dtml
> method
>
> <dtml-if "AUTHENTICATED_USER.getUserName()=='FredFlintstone'">
> <a href="index_html/editCalPropForm?prop=<dtml-var d>&propval=<dtml-var
> dprop url_quote>">
> <dtml-var "date.dd()">
>
> Could someone be kind enough to show me:
>
> 1. How to get the current logged User from the CMF.
>
> 2. How to return the Event within the CMF.
>
The CalendarTag only is a widget that draws a calendar, it doesn't store
events. The Jon Udell howto explains how to use the CalendarTag to build
an interface to display/manage events. This is a very simple example where
events are folder properties, only 1 event can occur in a day.
In a real app. events would be objects, it could be possible to index
events with a Catalog using its date as index (for example "date.Date()"
where date is a DateTime instance). In the body of the CalendarTag you
could show the events for a given date, to get them you would do a query
to the Catalog, for example:
<dtml-calendar ...>
<dtml-in "Catalog(date=date.Date())">
... (show the event)
</dtml-in>
</dtml-calendar>
hope this helps,
jdavid
> Thanks
>
> Norman
>
>
>
> _______________________________________________
> Zope-CMF maillist - Zope-CMF@zope.org
> http://lists.zope.org/mailman/listinfo/zope-cmf
>
> See http://www.zope.org/Products/PTK/Tracker for bug reports and feature requests
>