[Zope] Cataloging PageTemplates

Mark Gibson mark at kaivo.com
Fri Dec 12 13:29:24 EST 2003


Thanks Casey,

This is along the lines I was thinking, but I was hoping somebody 
already did this work for me.

Mark
> 
> 
> Page templates normally aren't considered content. Telling when a page template is "changed" is not really possible because of this. "Changed" to me means that the rendered HTML is different. The rendered HTML of a page template is different for every object the template is used with.
> 
> I think you want to use something different than a basic page template. You want a document that can contain ZPT markup. This would not be a template, but a "dynamic document". If the output never changed except when the document itself was edited, then you could catalog the object automagically.
> 
> Things like dynamic documents are not the standard rhythm anymore in Zope. Which is why there is no ZPT equivilant to DTML documents included with Zope. The rhythm is to have static content objects (like files, stx docs, custom objects) which have ZPTs applied to them as views. You would not catalog the content objects, not the page templates.
> 
> Ironically (and much to some people's chagrin) Zope3 does include a notion of a content object that contains markup. So I guess overall the message is mixed.
> 
> Anyhow I think your best bet is to subclass ZopePageTemplate and CatalogPathAware and add a SearchableText method to your subclass that renders the ZPT for cataloging. Actually, if all the content is actually in the document (and not included from others) then you could probably skip the rendering part and just return the source.
> 
> hth,
> 
> -Casey
> 
> _______________________________________________
> Zope maillist  -  Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )





More information about the Zope mailing list