[Zope] DTML Doc property from DTML Method in tag
Richard Wackerbarth
rkw@dataplex.net
Mon, 15 Feb 1999 06:23:08 -0600 (CST)
I don't think so.
Which "title" are you referencing?
I have a very similar problem.
In a form, I generate a list of 'ids' (just like the manage screens).
When processing that form, I call "manage_delObjects" just fine.
However, before doing so, I would like to generate a report.
That report needs to list not the 'id', but the 'common_name' of the
item.
-- -- snip -- --
<!--#in ids-->
<P><!-- This gets the ID --> <!--#var sequence-item-->
<!-- But this gives a key error --> <!--#var common_name-->
<!--#/in-->
<!-- This is fine if I don't make the above error -->
<!--#call "manage_delObjects(REQUEST=REQUEST, ids=ids)"-->
-- -- snip -- --
On Mon, 15 Feb 1999, Martijn Faassen wrote:
> Kevin Dangoor wrote:
> >
> > I'm having trouble getting at an DTML Document property
> > from within an in tag in a DTML Method. I have a folder property
> > that lists the documents I want to appear in a particular order.
> > I would like to display the "title" and "summary" of those documents.
> >
> > <!--#in docs-->
> > <p><!--#var ???--></p>
> > <!--#/in-->
> >
> > So, if the docs list contained an entry "test", what would I put in
> > the var tag to get test.title? If I use "test.title", I get the
> > title. If I try "sequence-item+'.title'" or "_[sequence-item+'.title']",
> > I get a NameError. What simple little thing am I missing here?
>
> I may be wrong here as this involved a subobject of an object, however,
> I suggest you try simply:
>
> <!--#in docs-->
> <p><!-- #var title--></p>
> <!--#/in-->
>
> The namespace inside #in changes to that of sequence-item. This is
> documented in the Zope DTML User's guide (page 11, name lookup, I
> suspect), but (hint) an "idiot's guide to DTML name lookup" would be
> useful. I myself found out about this through experimentation. :)
It does not seem to do so for me.