[Zope-CMF] Dublin Core Metadata

Tres Seaver tseaver@zope.com
10 Jul 2002 11:17:38 -0400


On Wed, 2002-07-10 at 07:22, Jan Ulrich Hasecke wrote:

> I am a little confused. When I look at the HTML-Source generated by
> CMF there are no Dublin Core Metatags. Do I have to insert them into
> some template (eg. header) by hand or is there any automagically way
> to do this? Or do I misunderstood it at all? 

The "stock" implementation of the DublinCore interfaces stores the
metadata as attributes of the content objects, and not "inline" in
the content (the content only contains the "body", not the "head",
because the head is generated by templates).  The stock templates
do not incorporate the metadata (except Title), but could easily
be customized to do so.  Adding the <meta> tags does add to the expense
of rendering each page.

I have just added a utility method, 'listMetaTags', on the head of CVS
(not the beta branch, as this is a new feature.  To use it, customize
your 'main_template' as follows:
 
+ <meta tal:repeat="keyval here/listMetaTags" 
+       tal:attributes="name python:keyval[0];
+                       content python:keyval[1];
+                      "
+ />

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com