RE: [Zope] How to list objects across different containers in Zope's tree?
Ausum, It may be time to re-think your site structure. I have a news type site as well and here is how I handle it (my way... not saying it is by any means the best or right way). Instead of storing your news items in a series of folderish objects, maybe create folders for each section and then create a news item ZClass with the article date or goLiveDate as the ID. zopesite:8080/sports/2000.10.17/newsobjectid_htm Then do some dtml to pull out the ones you want on the main "sport/thislist_htm" page. Better yet use ZCatalog to search for the range of news items you want to appear in the list. Hope this helps!! Jamey Sintz -Original Message- From: Ausum [SMTP:[EMAIL PROTECTED]] Sent: Wednesday, January 17, 2001 1:35 PM To: [EMAIL PROTECTED] Subject: [Zope] How to list objects across different containers in Zope's tree? Few days ago there was this same question although remained unsolved. This is the case for a news site: News objects are within section folders, within day folders, within months, and within a year folder. Just like this, at the root: http://zopesite:8080/2000/October/17/sports/newsobjectid_htm If I were at, ie, root/2001/January/thislist_htm , how can I list(and retrieve) sport news appeared from October 29th to November 10th in year 2000? Is it time to look for a database? Thanks in advance, Ausum ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] How to list objects across different containers in Zope's tree?
Thanks for the tip, James. It seems a clever approach although I must keep it for the time being. Anyway if that were the case, the question could be this one: How can I list all the headlines and summaries for all the news appeared for sports, locals and politics sections (in example) from December 27th,2000 and January 5th, 2001 ? Greetings, Ausum James Sintz wrote: Ausum, It may be time to re-think your site structure. I have a news type site as well and here is how I handle it (my way... not saying it is by any means the best or right way). Instead of storing your news items in a series of folderish objects, maybe create folders for each section and then create a news item ZClass with the article date or goLiveDate as the ID. zopesite:8080/sports/2000.10.17/newsobjectid_htm Then do some dtml to pull out the ones you want on the main "sport/thislist_htm" page. Better yet use ZCatalog to search for the range of news items you want to appear in the list. Hope this helps!! Jamey Sintz ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] How to list objects across different containers in Zope's tree?
Right off the top of my head, since the sections are folder objects you could simply dtml-in through the folders and then inbed another dtml-in. Example (nothing fancy). I did not include any date range stuff, but you can probably figure that out on your own. It may be better to include a 'section' property in your zClass and then just search your Catalog (see catalog example below for an UNTESTED example). dtml-in "objectValues(['Folder'])" dtml-var name_or_idbr !-- now use the folder id to move into the correct namespace -- dtml-with id !-- news stories here -- dtml-in "objectValues(['newItems'])" dtml-var headlinebr dtml-var summarybr /dtml-in br /dtml-with br /dtml-in Catalog example dtml-in "objectValues(['Folder'])" dtml-var name_or_idbr dtml-in "Catalog( { 'meta_type' : 'newsItem', 'section' : id, 'goLiveDate' : [ 2000/27/12 , 2001/05/01], 'goLiveDate_usage' : 'range:min:max' } )" dtml-var headlinebr dtml-var summarybr /dtml-in br /dtml-in -Original Message- From: Ausum [SMTP:[EMAIL PROTECTED]] Sent: Wednesday, January 17, 2001 3:18 PM To: James Sintz; [EMAIL PROTECTED] Subject: Re: [Zope] How to list objects across different containers in Zope's tree? Thanks for the tip, James. It seems a clever approach although I must keep it for the time being. Anyway if that were the case, the question could be this one: How can I list all the headlines and summaries for all the news appeared for sports, locals and politics sections (in example) from December 27th,2000 and January 5th, 2001 ? Greetings, Ausum James Sintz wrote: Ausum, It may be time to re-think your site structure. I have a news type site as well and here is how I handle it (my way... not saying it is by any means the best or right way). Instead of storing your news items in a series of folderish objects, maybe create folders for each section and then create a news item ZClass with the article date or goLiveDate as the ID. zopesite:8080/sports/2000.10.17/newsobjectid_htm Then do some dtml to pull out the ones you want on the main "sport/thislist_htm" page. Better yet use ZCatalog to search for the range of news items you want to appear in the list. Hope this helps!! Jamey Sintz ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] How to list objects across different containers in Zope's tree?
If I were at, ie, root/2001/January/thislist_htm , how can I list(and retrieve) sport news appeared from October 29th to November 10th in year 2000? Is it time to look for a database? Nope, it's time to read up on ZCatalog ;-) There's a great chapter on this in the new Zope Book, but as I'm at home and over dialup, the URL isn't to hand, perhaps someone else could help? cheers, Chris ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] How to list objects across different containers in Zope's tree?
Better yet use ZCatalog to search for the range of news items you want to appear in the list. :-) Checkout the Squishdot product too (http://www.squishdot.org), it might provide what you need with minimal effort... cheers, Chris ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] How to list objects across different containers in Zope's tree?
Thanks Chris, I'll find it and download it. About the ZCatalog, I've recently tested it and I was wondering whether it's possible for its search engine to find parts of a word, maybe to have an Ultraseek-like search results page. Apparently the engine doesn't find any half-a-word. Example: Looking for "bio" won't find "Edison's biography" . Am I missing something? Cheers, Ausum Chris Withers wrote: If I were at, ie, root/2001/January/thislist_htm , how can I list(and retrieve) sport news appeared from October 29th to November 10th in year 2000? Is it time to look for a database? Nope, it's time to read up on ZCatalog ;-) There's a great chapter on this in the new Zope Book, but as I'm at home and over dialup, the URL isn't to hand, perhaps someone else could help? cheers, Chris ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] How to list objects across different containers in Zope's tree?
Thank you again James. I'll test your code. I thought there was a simpler way to list objects across containers. Something that could list objects within the same level (starting from the root), as if each folder at the root was a column, and its subfolders elements of a raw. Ausum James Sintz wrote: Right off the top of my head, since the sections are folder objects you could simply dtml-in through the folders and then inbed another dtml-in. Example (nothing fancy). I did not include any date range stuff, but you can probably figure that out on your own. It may be better to include a 'section' property in your zClass and then just search your Catalog (see catalog example below for an UNTESTED example). dtml-in "objectValues(['Folder'])" dtml-var name_or_idbr !-- now use the folder id to move into the correct namespace -- dtml-with id !-- news stories here -- dtml-in "objectValues(['newItems'])" dtml-var headlinebr dtml-var summarybr /dtml-in br /dtml-with br /dtml-in Catalog example dtml-in "objectValues(['Folder'])" dtml-var name_or_idbr dtml-in "Catalog( { 'meta_type' : 'newsItem', 'section' : id, 'goLiveDate' : [ 2000/27/12 , 2001/05/01], 'goLiveDate_usage' : 'range:min:max' } )" dtml-var headlinebr dtml-var summarybr /dtml-in br /dtml-in -Original Message- From: Ausum [SMTP:[EMAIL PROTECTED]] Sent: Wednesday, January 17, 2001 3:18 PM To: James Sintz; [EMAIL PROTECTED] Subject: Re: [Zope] How to list objects across different containers in Zope's tree? Thanks for the tip, James. It seems a clever approach although I must keep it for the time being. Anyway if that were the case, the question could be this one: How can I list all the headlines and summaries for all the news appeared for sports, locals and politics sections (in example) from December 27th,2000 and January 5th, 2001 ? Greetings, Ausum James Sintz wrote: Ausum, It may be time to re-think your site structure. I have a news type site as well and here is how I handle it (my way... not saying it is by any means the best or right way). Instead of storing your news items in a series of folderish objects, maybe create folders for each section and then create a news item ZClass with the article date or goLiveDate as the ID. zopesite:8080/sports/2000.10.17/newsobjectid_htm Then do some dtml to pull out the ones you want on the main "sport/thislist_htm" page. Better yet use ZCatalog to search for the range of news items you want to appear in the list. Hope this helps!! Jamey Sintz ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] How to list objects across different containers in Zope's tree?
Example: Looking for "bio" won't find "Edison's biography" . Am I missing something? Yup, you need to find out about 'globbing vocabularies' Apparently the performance sucks right now, though :-( ...although there are moves to fix it taking place :-) cheers, Chris ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] How to list objects across different containers in Zope's tree?
Ausum [EMAIL PROTECTED] asked: Few days ago there was this same question although remained unsolved. This is the case for a news site: News objects are within section folders, within day folders, within months, and within a year folder. Just like this, at the root: http://zopesite:8080/2000/October/17/sports/newsobjectid_htm If I were at, ie, root/2001/January/thislist_htm , how can I list(and retrieve) sport news appeared from October 29th to November 10th in year 2000? Is it time to look for a database? This kind of stuff is what the ZCatalog is for. Check out the ZTopic product on zope.org as well. In addition, you might be interested in the PTK: http://www.zope.org/Products/PTK Tres. -- === Tres Seaver[EMAIL PROTECTED] Digital Creations "Zope Dealers" http://www.zope.org ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )