[CPS-devel] Using a local vocabulary for a Contentbox under CPS 3.3.8

Patrick CHAILLOUX patch at noos.fr
Wed May 31 12:34:51 CEST 2006


Hi,

I'm trying to force a contentbox to list documents using some local 
metadata vocabulary  ('Local Vocabularies Container' under CPS).
I have some trouble accessing the local vocabulary in 
"contentbox_edit_form".

'Themes'  is a property of my documents' metadata. It uses a local 
vocabulary.
I tried to recycle some code used in the "advanced search form" but of 
course it's using the locale 'here'.

        <tr> <b>Choose some themes</b>

            <select size="5" name="Themes:list" multiple="multiple"
              tal:define="themes_set python:request.get('Themes', ());
              all_themes python:here.getListFromVocabulary('themes_voc')">
            <option value="" tal:attributes="selected not:themes_set"
                i18n:translate="label_all">All</option>
            <option 
                tal:repeat="item all_themes/items"
                tal:attributes="value python:item[0];
                                selected python:item[0] in themes_set or None"
                tal:content="python:item[1]"
                i18n:translate=""></option>
            </select>

        </tr>

I need this chunk to use as context the folder I have chosen in 
'contentbox_edit_form.' .
I tried modifying this to :
                 all_themes 
python:box['box'].getListFromVocabulary('themes_voc')">

but it still lists the global vocabulary.

Any lead ?

Patrick CHAILLOUX


More information about the cps-devel mailing list

This list archive provided by Nuxeo, the leaders of open source ECM. Check out the Nuxeo 5 open source, standards-based ECM project.