[Zope] Accessing a DTML object
Tue, 04 Jun 2002 10:46:03 +0100
G F wrote:
> I am not sure what you mean by trying EventFolder. I
> have a folder called "events". I can use dtml-in and
> call all the dtml documents in the folder, but I only
> want to call one of them.
> --- firstname.lastname@example.org wrote:
> > Have you tried EventFolder?
> > G F <email@example.com> on 06/03/2002 11:39:47
> > AM
> > To: firstname.lastname@example.org
> > Subject: [Zope] Accessing a DTML object
> > I am hoping some knowledgeable person out there can
> > help me.
> > I am trying to make a simple little web calendar.
> > The
> > first page that of the calendar is a list of dates
> > that come from a bunch of DTML Documents in a folder
> > called 'events'. Each DTML Document is an event. To
> > do
> > this I use something like:
> > <ul>
> > <dtml-in expr="events.objectValues()">
> > <li><a
> > href="calendarItem?cal_id=<dtml-varid>"><dtml-var
> > date></a>
> > </dtml-in>
> > </ul>
Note that <dtml-var date> will always show the current date.
I am not sure if this is what you want.
<a href="calendarItem?cal_id=<dtml-var id url_quote>"><dtml-var id></a>
> > This makes a list of dates that are linked to a DTML
> > Method 'calendarItem'. I pass the variable cal_id to
> > 'calendarItem' so it can display more information
> > about the date.
> > How do i use the variable 'calendarItem' to open the
> > DTML Document into an HTML page?
> > I tried:
> > <dtml-in expr="events.objectValues('DTML
> > Document')">
> > <dtml-if expr="id == cal_id">
<dtml-if expr="getId() == cal_id">:
("id" is deprecated), see
> > <dtml-var date><br>
> > <dtml-var title><p>
> > <dtml-var sequence-item>
> > </dtml-if>
> > </dtml-in>
> > But for some reason that did not work. It seams that
> > even if it did work there would be a better way.
> > Thank you for your help.
> > Gary
to understand this better, it would be helpful to know,
a) the event-folders objects have ids that are dates (or am i wrong?)
b)what did not work.
error messages? html not what you want?
in browser, view frame source to view the generated html.
there is a <dtml-var calendar> tag
and an corresponding calendar product,
both covered in the spicklemire book.
there is a product EventFolder
http://www.zope.org/Members/jeffsasmor/EventFolder (Zope 2.3.3)
http://www.zope.org/Members/Barabbas/EventFolder (Zope 2.4)
Who's got only a hammer sees the world as a nail
hans augustin (software developer) email@example.com
beehive elektronische medien GmbH http://www.beehive.de
phone: +49 30 847-82 0 fax: +49 30 847-82 299