{*gather attributes for a node object's class and assign to $attributes variable*}
{def $attributes=fetch( 'content', 'class_attribute_list', hash( 'class_id', $class.object.contentclass_id ) )}
{*start the table*}
<table border="1">
{*create the headers row using each attribute name as a column header*}
<th>
<tr>
{foreach $attributes as $attribute}
{if or(eq( $attribute.identifier, 'organization_name'),eq( $attribute.identifier ,'org_type'))}
<td>
{$attribute.name|wash}
</td>
{/if}
{/foreach}
</tr>
</th>
The examples in the documentation for the "or" operator really threw me off. I couldn't figure out what was being compared and assumed it was the first parameter. Your code makes a lot more sense.
Cheers,
Fraser
You must be logged in to post messages in this topic!