Hi list, I am new to Zope and I am stuck with this problem: I have created folders and subfolders and I now need to retrieve the content of these subfolders and display it in the home page. Let's say I have 4 different folders, each one has 3 subfolders and each subfolder has a list of articles or news_items. How can I import the content of the last article published in a specified subfolders, in the homepage? or the last news_item published in a specified subfolder into the index_html of the homepage? thanks for helping Luca
Santagostino Pretina, Luca wrote:
I am new to Zope and I am stuck with this problem: I have created folders and subfolders and I now need to retrieve the content of these subfolders and display it in the home page. Let's say I have 4 different folders, each one has 3 subfolders and each subfolder has a list of articles or news_items. How can I import the content of the last article published in a specified subfolders, in the homepage? or the last news_item published in a specified subfolder into the index_html of the homepage?
This depends on your article and news_item. If they are catalogAware the easiest way is to use the catalog. Else you will have to traverse the subfolders, get all the latest item from each folder by sorting their content and taking the last one out. The latter approach is best done via a Python Script, but with many articles it can be a pretty expensive operation. But as I said, the smartest approach is to use the catalog. regards Max M
participants (2)
-
Max M -
Santagostino Pretina, Luca