[Zope-CMF] Adding / Listing Metadata Elements
Norbert Marrale
norbert@attira.com
Fri, 10 Aug 2001 16:57:52 +0200
On 10 Aug 2001, at 8:27, Tres Seaver wrote:
> Norbert Marrale wrote:
[..]
> > I'm running into the same problem as Norman did a few days ago, trying
> > to have metadata_edit_form reflect the new elements I added to the
> > portal_metadata tool.
> >
> > Dan posted someting to this list, before Tres' update of the
> > portal_metadata tool, about being successful in customizing the
> > metadata_edit_form,
(Replying to self) Dan's email bounced... I'm looking for the correct
syntax to display a list similar to "Subject" in the metadata_edit_form I
think this is also what Norman was after.
i.e. I have a list of countries (a multi-valued portal_metadata element
"Countries", filled with values -- and counterpart keyword index and
metadata in portal_catalog)
Changing the first line of the snippet below to
<dtml-let contentSubject=Countries
returns a keyerror? What am I still missing here?
<dtml-let contentSubject=Subject
allowedSubjects="portal_metadata.listAllowedSubjects( this() )"
>
<select name="subject:list" multiple>
<dtml-in allowedSubjects>
<dtml-let item=sequence-item
sel="item in contentSubject and 'selected' or ''"
>
<option value="&dtml-sequence-item;"
&dtml-sel;> &dtml-sequence-item; </option>
</dtml-let>
</dtml-in>
</select>
</dtml-let>
[..]
> > indexed metadata values anyway, so wouldn't it only be a natural
> > extension to be able to choose from these values in the criteria form ?
>
> It wouldn't be hard to add another criteria type to CMFTopic which
> does this for content of a specific type. The current StringCriterion
> just knows which catalog index it is using; 'Type' itself is one of them!
> For topics like my 'how-to' one on the dogbowl,
> http://cmf.zope.org/doc/how_tos
> which span content types, the metadata tool is not much help.
>
> Tres.
> --
Ah (lightbulb switches on) I guess I'll look at this sometime in the future
then, I don't expect topics on my site to be created all too often, this
part can wait :) Thx!
Norbert
On the Road of Life,
there are Tourists and there are Travelers.
I'd rather be Traveling!
Norbert Marrale
norbert@infocatch.com