Because it's just a string value, you'll need to test for the specific value 'True' inside the new-window element for it to work as expected (try unchecking the box and see that it will still render the target attribute) - you can do it like this:
Having to update an old site and modify some XSLT (shiver). I've added a uComponents Multi-Url Pick and given it an alias of "link". I can't work out why I can't get to the data using either ./link/url-picker/url or $currentPage/link/url-picker/url
ucomponents url picker
Hi,
I just installed ucomponents and I'm using the url picker.
I was wondering if anyone can show me a simple example of accessing the properties of the XML in XSLT.
I'm new to XSLT and I don't even know where to begin.
Sorry for the noobness :)
Thank you!
Hi Elad,
I've not used it but from looking at their documentation here http://ucomponents.codeplex.com/wikipage?title=UrlPicker&referringTitle=Documentation
If you have the results set to XML then you can grab the values like this:
Let me know if this produces some output and then we can go from there.
Rich
Yep. That did the trick.
Just made a few small modifications. This is the line of code I endded up using:
<xsl:value-of select="./partnerLink/url-picker/url" />
Thank you!
Also added a little something to check for the new-window attribute:
<div class="partner-link">
<a>
<xsl:attribute name="href">
<xsl:value-of select="./partnerLink/url-picker/url" />
</xsl:attribute>
<xsl:if test="./partnerLink/url-picker/new-window">
<xsl:attribute name="target">_blank</xsl:attribute>
</xsl:if>
Website Link
</a>
</div>
Hi Elad,
Because it's just a string value, you'll need to test for the specific value 'True' inside the new-window element for it to work as expected (try unchecking the box and see that it will still render the target attribute) - you can do it like this:
- or if you (like me) prefer separate templates, like this:
/Chriztian
Works!
Using Razor? Well so am I! Was looking for some help on how to do this in Razor. Finally found this thread here : http://our.umbraco.org/projects/backoffice-extensions/ucomponents/questionssuggestions/22766-Retrieve-URL-Picker-data-in-Razor ... which I'm posting here in case someone else might benefit from it?
P.S., I haven't actually tried the advice in the related linked page above. But it certainly looks simple/straight-forward enough to do!
hi,
My Page URL is like ~/new-page.aspx??lang=en&mId=1556&sId=1557 as shown in above image...
Now i want that when i open this page then my URL should be like this.. ~/New-page/Goog-page as shown in image...
Is this possible..??
Can anyone have idea about that than please tel me..
Thanks in Advance...
Hi,
Having to update an old site and modify some XSLT (shiver). I've added a uComponents Multi-Url Pick and given it an alias of "link". I can't work out why I can't get to the data using either ./link/url-picker/url or $currentPage/link/url-picker/url
Any pointers would be greatly appreciated
Cheers,
Craig
Panicked early again!
Turned out I had to use <xsl:value-of select="./link/multi-url-picker/url-picker/url" />
Hope this helps someone else.
Craig
This might help:
http://refreshwebsites.co.uk/blog/get-data-from-ucomponents-multi-url-picker/
Its for Razor on a 4.11.x site
Best of luck
is working on a reply...