Python and Zope
nixx at telia.com
Sun Oct 7 15:57:27 CEST 2001
> "Magnus" <nixx at telia.com> ...
>> When using <dtml-var myObject> to 'include' files/objects it is working
>> well if the files are in the same directory.
> Your question can mean several different things, i'll try to answer them.
> If you want to build a news site with articles in different folders like:
> And if you then want to have a list of all the articles on the front page
> you could either traverse the folders manually
> <dtml-call "REQUEST.set('all_articles', general.objectValues() +
> conmputers.objectValues() + Hifi.objectValues() +
> Politics.objectValues())"> <dtml-in all_articles>
> <a href="<dtml-var absolute_url>"><dtml-var title_or_id></a><br>
> Or you could use the Catalog to to list the articles. This is probably the
> best way to do it in the long run and it will be faster too.
> regards Max M
great stuff though I was looking for a different answer but this is also
something I need.
I was more after an answer where you are composing a page with several
objects (sorry if I use the wrong notation I'm a newbie in Python and Zope)
But in my case I have some images, and script in various folders hence I
would like to do something like:
(But this syntax is wrong.)
Should it be something like:
(I just found some objects that might be useful but haven't tried them out
yet e.g. RESPONSE, REQUEST and so forth.)
More information about the Python-list