[Zope-CMF] List subjects for Document Type only

Norman Khine khine@bmpublications.co.uk
Fri, 22 Jun 2001 14:07:49 +0100


Hello,
I would like to be able to list the vocabulary list only for the Document
Type and not any others. How do I do that.

I have something like, which I copied straight from the simple_metadata dtml
method. But this gives me a list of all the types.?!

<table cellpadding="0" cellspacing="0" width="100%" align="center"
border="0">

<td>
<tr valign="top">
<td>
   <dtml-let contentSubject=Subject
             allowedSubjects="portal_metadata.listAllowedSubjects( this() )"
   >

<dtml-in Subject
                ><dtml-let item=sequence-item
                ><dtml-unless expr="item in allowedSubjects"
                ><dtml-var sequence-item>
</dtml-unless></dtml-let></dtml-in></textarea>
   <dtml-comment>
       Comment out / delete this to ignore controlled vocabulary
       for Subject.
   </dtml-comment>
   <br>
    <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>
  </td>
</td>

 </table>

Many thanks

Norman