"Dynamic " select in template: HOW?

"Dynamic " select in template: HOW?

Monday 31 May 2004 8:35:27 am - 1 reply

Modified on Monday 31 May 2004 8:45:25 am by PaoloMellerio kk

Author Message

Trond Åge Kvalø

Tuesday 08 June 2004 7:38:50 am

Hello Paolo!

If I understand you correctly, the attribute may contain identical values, is that correct?

And you only want to show one of the identical values, right?

Then I would write your select like this:

<select class="search" name="t219" id="Search">
<option selected value="">Choose</option>
{let myfolder=47 used_node=false()} 
{let myAttributeValues=fetch(content,tree,hash(parent_node_id, $myfolder,class_filter_type, "include",class_filter_array, array(17)))}
{$myAttributeValues|unique} {*This is where you remove the duplicate values*}
{section loop=$myAttributeValues}
<option>{$:item.data_map.myattributeclass.content}</option>
{/section}
{/let}
</select>

I have not tested this, but try to see if it works.

best regards
trondåge

trondåge

You must be logged in to post messages in this topic!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.