[Zope-CMF] Non-standard metadata
David Harvey (Hamish)
david.harvey@bristol.ac.uk
17 Apr 2002 13:52:57 +0100
Two questions about the metadata tool.
1) If I want to use qualified DC elements, say to use the Subject
element with the narrower definition of Discipline, would I call the
element DisciplineSubject? Or Subject.Discipline? Or is there no
accepted standard for qualification?
2) Once I've created my new metadata element, how do I get at it? Using
the normal Subject, the following TAL presents a list of valid subjects
to choose from (at least it does within Plone, and I wouldn't like to
say how much is Plone-specific). Unfortunately, just changing Subject to
DisciplineSubject only works in the listAllowedVocabulary call. Any
pointers to where I need to be looking?
<div class="row">
<span class="label">Subjects</span>
<span class="field">
<select name="subject:list" multiple size="5"
tal:define="contentSubject here/Subject;
allowedSubjects
python:here.portal_metadata.listAllowedVocabulary('Subject',here);">
<option tal:replace="nothing">Type 1</option>
<option tal:replace="nothing">Type 2</option>
<option tal:replace="nothing">...</option>
<option value="subj"
tal:repeat="subj allowedSubjects"
tal:attributes="value subj;
selected python:subj in
contentSubject and 1 or 0"
tal:content="subj">Type N</option>
</select>
</span>
<span class="info">
Select all titles that apply to this item. These areas
correspond to the main site categories.
</span>
</div>
Cheers,
Hamish
--
David Harvey (aka Hamish)
Research Assistant, Water and Environmental Management Research Centre
University of Bristol, Lunsford House, Cantock's Close, Bristol BS5 6BU
Tel: +44 (117) 9289768 Fax: +44 (117) 9289770
Email: david.harvey@bristol.ac.uk
GPG/PGP Key Fingerprint: 6F15 A1C7 342F 2F87 E2CC 176D 1072 8A5B 20E8
E497
WWW: http://www.cen.bris.ac.uk/civil/pgra/dph/dph.htm