Hi, I'm new to Zope, so please forgive if this is a stupid question. What I am trying to do is the following: I have a site with an embedded SquishDot Folder called 'News'. This folder is linked to the main page. Now I want to get links to the headlines of the most recent News-entries embedded in the index_html document of the main page. I tried to create a DTML-method in the 'News' folder, which returns links to the articles. If I call this method inside the News folder I get what I want. BUT, how do call this method from the parent folder? I tried <!--#with News><!--#var headlines--><!--#/with-->, which gives me a 'KeyError' on 'headlines'. (Installed version: Zope-2.0.0b4) How can I get the desired result? tia, /steffen -- steffen@cyberus.ca <> Gravity is a myth -- the Earth sucks!
Hello Steffen - If News is in your acquisition path then something like this should work: <!--# var "News.headlines"--> Pavlos On Fri, 27 Aug 1999, Steffen Ries wrote:
Hi,
I'm new to Zope, so please forgive if this is a stupid question.
What I am trying to do is the following:
I have a site with an embedded SquishDot Folder called 'News'. This folder is linked to the main page.
Now I want to get links to the headlines of the most recent News-entries embedded in the index_html document of the main page.
I tried to create a DTML-method in the 'News' folder, which returns links to the articles. If I call this method inside the News folder I get what I want. BUT, how do call this method from the parent folder?
I tried <!--#with News><!--#var headlines--><!--#/with-->, which gives me a 'KeyError' on 'headlines'. (Installed version: Zope-2.0.0b4)
How can I get the desired result?
tia, /steffen -- steffen@cyberus.ca <> Gravity is a myth -- the Earth sucks!
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
(To receive general Zope announcements, see: http://www.zope.org/mailman/listinfo/zope-announce
For developer-specific issues, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
You, Pavlos Christoforou wrote:
Hello Steffen -
If News is in your acquisition path then something like this should work:
<!--# var "News.headlines"-->
Pavlos
Pavlos, thanks, with your answer I did figure it out (although I don't quite like it yet). <!--#var "News.headlines"--> inserts the contents of the DTML method into the calling document. Not exactly what I wanted :-) However, <!--#with "News"--> <!--#var headlines--><!--#/with--> works. The only problem remaining is that the links are relative to the parent page, instead of relative to "News". I solved it by putting the following code in the parent directory: <!--#with "News"--> <!--#if has_items--> <!--#in item_list--> <!--#if "reviewed or not moderated"--> <A HREF="<!--#var URL1-->/News<!--#var thread_path-->/<!--#var id-->/index_html"><!--#var title--></a><BR> <!--#/if reviewed--> <!--#/in item_list --> <!--#/if has_items--> <!--#/with--> Any better idea? thanks again, /steffen -- steffen@cyberus.ca <> Gravity is a myth -- the Earth sucks!
participants (2)
-
Pavlos Christoforou -
Steffen Ries