-----Original Message----- From: Tim Wilson <wilson@chemsun.chem.umn.edu> To: Paul Everitt <Paul@digicool.com> Cc: Zope Listserv <zope@zope.org> Date: Wednesday, August 25, 1999 7:56 PM Subject: RE: [Zope] DTML syntax
Thanks Paul. I was making it way too hard. Here's another Zope style question. From a long-term site maintenance perspective, would it be better to create my PDF file objects in scattered directories, or should I create a /download folder with some hierarchical storage system there? Perhaps the question is too abstract.
I'd like to create some sort of navigation tree that would allow someone to download any of the available PDFs from one central page in addition to the links that I'm provding in the sub-folders dedicated to each of our curriculum units. (See http://206.131.108.122:8080/atlas/curriculum/particle/ for an example.) Are there any special issues to consider in this case as I decide where in the ZODB to store my PDFs?
If it works better for you, you can store the PDFs in the same area as other related content. If you want to make a central PDF download page, you could then set up ZCatalog to index the property "content_type", and do a Find to catalog the objects. Then, your download page just needs to search the catalog for content_type: application/pdf (or whatever the type is). It could be as simple as: <dtml-in "Catalog({'metatype': 'File', 'content_type': 'application/pdf'})"> <a href="/<dtml-var "getpath(data_record_id_)">/index.html"><dtml-var title></a> </dtml-in> Kevin
Kevin Dangoor wrote:
-----Original Message----- From: Tim Wilson <wilson@chemsun.chem.umn.edu> To: Paul Everitt <Paul@digicool.com> Cc: Zope Listserv <zope@zope.org> Date: Wednesday, August 25, 1999 7:56 PM Subject: RE: [Zope] DTML syntax
Thanks Paul. I was making it way too hard. Here's another Zope style question. From a long-term site maintenance perspective, would it be better to create my PDF file objects in scattered directories, or should I create a /download folder with some hierarchical storage system there? Perhaps the question is too abstract.
I'd like to create some sort of navigation tree that would allow someone to download any of the available PDFs from one central page in addition to the links that I'm provding in the sub-folders dedicated to each of our curriculum units. (See http://206.131.108.122:8080/atlas/curriculum/particle/ for an example.) Are there any special issues to consider in this case as I decide where in the ZODB to store my PDFs?
If it works better for you, you can store the PDFs in the same area as other related content. If you want to make a central PDF download page, you could then set up ZCatalog to index the property "content_type", and do a Find to catalog the objects. Then, your download page just needs to search the catalog for content_type: application/pdf (or whatever the type is).
It could be as simple as:
<dtml-in "Catalog({'metatype': 'File', 'content_type': 'application/pdf'})"> <a href="/<dtml-var "getpath(data_record_id_)">/index.html"><dtml-var title></a> </dtml-in>
Yes, I would suggest exactly this. The Catalog is an excellent organizational tool. it drives much of the new zope site. -Michel
Kevin
_______________________________________________ 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 )
On Wed, 25 Aug 1999, Kevin Dangoor wrote:
If it works better for you, you can store the PDFs in the same area as other related content. If you want to make a central PDF download page, you could then set up ZCatalog to index the property "content_type", and do a Find to catalog the objects. Then, your download page just needs to search the catalog for content_type: application/pdf (or whatever the type is).
It could be as simple as:
<dtml-in "Catalog({'metatype': 'File', 'content_type': 'application/pdf'})"> <a href="/<dtml-var "getpath(data_record_id_)">/index.html"><dtml-var title></a> </dtml-in>
OK, this is cool. I just read the ZCatalog tutorial. Are you suggesting a simple search interface at the central download page or simply using ZCatalog to find the relevant, but scattered, PDF files and then create some sort of list of them that a user can click on? -Tim -- Timothy Wilson | "The faster you | Check out: Henry Sibley H.S. | go, the shorter | http://slashdot.org/ W. St. Paul, MN, USA | you are." | http://linux.com/ wilson@chem.umn.edu | -Einstein | http://www.mn-linux.org/
Tim Wilson wrote:
On Wed, 25 Aug 1999, Kevin Dangoor wrote:
If it works better for you, you can store the PDFs in the same area as other related content. If you want to make a central PDF download page, you could then set up ZCatalog to index the property "content_type", and do a Find to catalog the objects. Then, your download page just needs to search the catalog for content_type: application/pdf (or whatever the type is).
It could be as simple as:
<dtml-in "Catalog({'metatype': 'File', 'content_type': 'application/pdf'})"> <a href="/<dtml-var "getpath(data_record_id_)">/index.html"><dtml-var title></a> </dtml-in>
OK, this is cool. I just read the ZCatalog tutorial. Are you suggesting a simple search interface at the central download page or simply using ZCatalog to find the relevant, but scattered, PDF files and then create some sort of list of them that a user can click on?
Standard file objects are not catalogable by default, so you must first wrap them in an object that is. By creating a ZClass that first subclasses CatalogAwareness, and then File, you can create ZClass that stores your PDF files and also catalog's itself in the catalog. These features will also improve with time, they are new in 2.0. Perhaps even in the future all Zope objects will be more catalog intelligent. As a brute force measure to catalog non catalogable objects, you can tell the catalog to 'sweep' your your whole Zope system to catalog objects that match certain criteria. The use of this protocol means that an intelligent intra-catalog protocol could be developed when catalogs try to catalog other catalogs. In addition, the objects that the catalog returns from a query can be made catalog aware themselves. *That* whole idea overwhelms me instantly. You're application can be much simpler. Just design a ZClass that represents the object, whether it be a PDF file with meta data or whatever, as what you want it to be. A how-to on this will be forthcoming. In the meantime, I believe the KM news author is working with ZClasses, perhaps she/he can relate the experience? -Michel
-Tim
-- Timothy Wilson | "The faster you | Check out: Henry Sibley H.S. | go, the shorter | http://slashdot.org/ W. St. Paul, MN, USA | you are." | http://linux.com/ wilson@chem.umn.edu | -Einstein | http://www.mn-linux.org/
_______________________________________________ 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 )
participants (3)
-
Kevin Dangoor -
Michel Pelletier -
Tim Wilson