[Zope] DTML syntax

Michel Pelletier michel@digicool.com
Thu, 26 Aug 1999 00:45:16 -0400


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 )