[Zope] dtml-return question
Shalabh Chaturvedi
shalabh@pspl.co.in
Mon, 17 Jan 2000 23:48:09 +0530
James W. Howe wrote
> I want to add a DTMLMethod to a folder which will be used to return a
> subset of the items in the folder. I've written a method called
> allNewsArticles which looks like this:
>
> <dtml-return "objectValues('NewsArticle')">
>
> I have a method in another folder which references the result of this
> method and it looks like this:
>
> <dtml-in allNewsArticles>
> <... do stuff here...>
> </dtml-in>
There... since you call allNewsArticles in another folder, it tries to find
the NewsArticles under this 'other folder'.
I think what you need is this (untested):
<dtml-with "/path/to/folder_with_newsitems">
<dtml-in "objectValues('NewsArticle')">
<.. do stuff here ...>
</dtml-in>
</dtml-with>
Hope this helps.
~Shalabh
---------------------------------------------------------------
"We are all in the gutter,
but some of us are looking at the stars"
-Oscar Wilde
---------------------------------------------------------------