Monday 12 April 2004 5:17:33 am
I am using a section to loop through attribute names. I created a variable for the array of values to loop through called attribute_name. I can manually set my identifiers in the array like this: {let attribute_name=array(Name, Description, Image)} Then loop through and print the names like this:
{section var=heading loop=$attribute_name}
{$heading.item}</br> {/section} So far so good. But I want values in a text_line attribute called 'attribute_name_array' as the array. In this attribute I have entered; Name, Description. Now I define the attribute_name variable as: {let attribute_name=array($node.data_map.attribute_name_array.content)} The output from this is 'Name, Description' all together rather than seperated (i.e. it's not looping through 'Name' then 'Description'. I then added implode(', ') to try to separate them; {let attribute_name=array($node.data_map.attribute_name_array.content)|implode(', ')} and it separates each character rather than seperating at the ', ' delimiter. Any suggestions would be greatly appreciated.
|