Sunday 21 August 2005 5:05:48 am
Hi You need to create an override for the edit template. I suggest, you copy the default edit.tpl ans start from there: Look for the loop which iterates over the attributes:
{section name=ContentObjectAttribute loop=$content_attributes sequence=array(bglight,bgdark)}
Inside this loop, you can filter out one or more attributes like below
{section show=array('attribute_identifier1','other_attribute_identifier')|contains($ContentObjectAttribute:item.contentclass_attribute_identifier) }
<label>{$ContentObjectAttribute:item.contentclass_attribute.name|wash}</label><div class="labelbreak"></div>
<input type="hidden" name="ContentObjectAttribute_id[]" value="{$ContentObjectAttribute:item.id}" />
{attribute_view_gui attribute_base=$attribute_base attribute=$ContentObjectAttribute:item}
</div>
{section-else}
<label>{$ContentObjectAttribute:item.contentclass_attribute.name|wash}</label><div class="labelbreak"></div>
<input type="hidden" name="ContentObjectAttribute_id[]" value="{$ContentObjectAttribute:item.id}" />
{attribute_edit_gui attribute_base=$attribute_base attribute=$ContentObjectAttribute:item}
</div>
{/section}
In the example above, 2 attributes will be non-editable, just their value is shown. You may want to suppress the values output too visually, by eliminating <i>attribute_view_gui</i>, but it will be in the xhtml source code. hth -paul
eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans
|