[Zope-CMF] User creating a Document

Tres Seaver tseaver@palladion.com
Tue, 14 Aug 2001 09:40:02 -0400


Frank McGeough wrote:

> Zope 2.3.3, CMF 1.1
> If a member creates a document the form that is presented is :
> 
> "Standard Resource Metadata"
> 
> There are "Title" , "Description" , "Subject" fields. Then there is a list
> box below Subject that doesn't have anything in it and doesn't have a
> header.
> 
> I grep'd the source and found :
> CMFDefault\dtml\zmi_metadata.dtml contains the <h2> for Standard Resource
> Metadata and CMFDefault\skins\content\metadata_edit_form.dtml does as well.
> 
> Examining the source seems to indicate that the code is attempting to get a


> list of subjects? If this is so then I would like to do the following :
> 
> add a set of subjects that members can pick from


You do this in the 'portal_metadata' tool.  See the how-to:

   http://cmf.zope.org/CMF/Members/tseaver/how_tos/configuring_metadata_tool

> get rid of text field that member types in


Customize the 'metadata_edit_form' skin method, and remove it. See:

  http://cmf.zope.org/doc/devel/writing_skins


> My thought in this is to have a set number of subjects that I can then
> search for in order to present on certain pages within the site. For
> example, "Fuzzbot FAQ" would be a subject and have a page listing the
> title/descriptions of the returned pages.


Use a Topic, with criteria based on the "Subject" field.  The "How-Tos"
topic works just this way:

   http://cmf.zope.org/doc/how_tos


> 
> Does anyone have a suggestion on how to proceed?
> 
> Also, shouldn't the code not present the skinny empty list box if there are
> no existing subjects? It doesn't look very good.


We've left both in, with '<dtml-comment>' wrapped around them explaining
their use, so that CMFSite users could see how either strategy might
work.  You should be able to remove it when you customize that skin
(or perhaps allow free-form entry when the list is empty?)

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