As far as I know the Ultimate Picker just stores the node IDs of the selected values, e.g. if you have chosen 3 items in a checkbox list they will get stored as
'1133,4210,2874'.
In order to get e.g. the node names of these you would have to first get the node for each id and then read out their values, e.g.
Ultimate Picker CheckBoxList
I am at the moment trying to get the selected 'names' from the items selected for each sub-page of a node.
Using the XSLT below I am able to get the node ID but do not seem to be able to get the name (i.e. I am seeing 1124 rather than soccer).
What I am missing and where do I need to look (I have tried GetPreValueAsString, but this is throwing and XSLT error)?
Thanking you in advance.
TT
As far as I know the Ultimate Picker just stores the node IDs of the selected values, e.g. if you have chosen 3 items in a checkbox list they will get stored as
'1133,4210,2874'.
In order to get e.g. the node names of these you would have to first get the node for each id and then read out their values, e.g.
<xsl:for-each select="Exslt.ExsltString:tokenize(faqSportsCovered, ',')">
<xsl:value-of select="umbraco.library:GetXmlNodeById(current())/@nodeName" />
</xsl:for-each>
Cheers,
Sascha
Hi Sascha
Thanks for the suggestion.
Have just tried this, but am seeing the following error:
Error occured
Error in XSLT at line 38, char 12
36: <div class="sportsareas">
37: <ul>
38: >>> <xsl:for-each select="Exslt.ExsltString:tokenize(faqSportsCovered, ',')"> <<<
39: <li>
40: <xsl:value-of select="umbraco.library:GetXmlNodeById(current())/@nodeName"/>
I should have mentioned that I am using version 4.5.
Regards
TT
Hey TT,
I wrote a blog post a while back about how to use XSLT with the Ultimate Picker data-type...
http://blog.leekelleher.com/2009/09/08/umbraco-ultimate-picker-xslt-example/
You could use the Exslt tokenize() function, but I prefer the umbraco.library:Split() method. Here's an example of the XSLT:
Cheers, Lee
Hi Lee
Thanks very much this worked like a dream.
I will now read your blog article to see why and how.
It would be a help to me, and I am sure others, if there could be an area on the forum giving other blogs etc. to look at.
Once again thanks Lee.
Regards
TT
Hi TT, I should really copy across my blog posts to the wiki section ... I'll get around to it one day!
For now, remember that Google is your friend. Obviously you need the right keywords. ;-)
e.g. http://www.google.co.uk/search?q=Ultimate+Picker+XSLT
Glad it worked out!
Cheers, Lee.
Hi Lee
Getting the Google search terms that work and be fun sometimes.
I had no luck this time.
Thanks once again.
TT
is working on a reply...