Perhaps you can also find further inspiration in this thread https://our.umbraco.org/forum/developers/xslt/4482-xslt-distinct - Only be aware that since these examples where created the XML schema of Umbraco changed - So if you see "node/data[@alias ='something']" a lot, which was the old way to do the XSLT back then. Just mentioning so you don't get confused by it :)
How to get distinct values
Hi, I'm struggling with an xslt that is suppose to give me some distinct values that I'm gonna use as options in a select.
Here is what I've got:
The for-each gives me : Mercedes, BMW, BMW, Audi and it should give me Mercedes, BMW, Audi
So I guess someting in the for-each isn't right.
Can someone see what I'm doing wrong?
Best regards Palle
Hi Palle
I think you're missing a key in the above code - See the example by Tommy here http://blackpoint.dk/umbraco-workbench/xslt/grouping--distinct-values.aspx?p=3
Perhaps you can also find further inspiration in this thread https://our.umbraco.org/forum/developers/xslt/4482-xslt-distinct - Only be aware that since these examples where created the XML schema of Umbraco changed - So if you see "node/data[@alias ='something']" a lot, which was the old way to do the XSLT back then. Just mentioning so you don't get confused by it :)
Hope this helps!
/Jan
Hi Jan.
Thanks, it' helped You were right. Got it to work with this:
Palle
is working on a reply...