| Wednesday 20 September 2006 1:29:06 pm 
                                                                 Hello Laurent 
As you selection is fortunately a single selection such a query is fairly easy. So alltogether I would create such a selectbox like this:- Fetch the class attribute for this object attribute to get an array with the ids and the corresponding clear names of all options.
 - Go through each item in this array and make a simple fetch to check whether there is at least one object where the current option is selected. Something like this:
 
{set $testNodesArr = fetch('content', 'tree', hash ('parent_node_id', 2,
                                                                'limit', 1,
                                                                'attribute_filter', array( array( '<your_class>/<your-selection_attribute_identifier>', '=', <id of current option>))))}
If possible, it might be a good idea to use a better parent node and use list instead of tree. Also an limitation to the class type might be good, I was just to lazy to look up the proper syntax.If $testNodesArr exists and has at least one item, there is a object where the current option is selected so add this option to the selectbox.
 As you can see this is something which should be well cached. Greetings from Luxembourg Claudia |