uComponents has been a real blessing - thank you! The urlPicker is exactly what I was looking for. I'm once again failing in the XSLT department.. I don't understand how to output in XSLT correctly. I have:
<xsl:variable name="newsLinkName" select="string($featuredItem/newsLink)"/> <a href="{$newsLinkName}">Read full story »</a>
But because I'm checking the "open in new window" I'm getting a url with a prefix of "true". How do I parse the info correctly?
The URL Picker stores its various properties in url-picker XML nodeset, so to access each property you'd use something like:
<xsl:variable name="newsLinkName" select="$featuredItem/newsLink/url-picker" /> <a href="{$newsLinkName/url}">Read the full story » </a>
But, the datatype can store different types of URL's - media, content, string, etc - so the URL field can be different depending on the type. Here's a snippet I used in a past project to handle all different types, and the open in new window option:
Unrelated issue - I get an error when I try to save a link using Upload mode. I disabled it for now, but I might revisit it later. Where should it be saving if you use this?
The upload mode stores the value in the 'url' field just like the "URL" option, and (I believe) uploads the file to /media/<propertyid>/<file> just like the regular Upload datatype.
There is a known issue where if you save & publish twice without reloading the page you'll get an "Object reference..." error, could that be what you are experiencing? If so please vote up the issue. Otherwise what error are you getting and when?
Yes, you are right, the error was due to this known issue. I will vote the issue up. I tested it after a fresh page load and it uploads successfully into Media, though like the generic Upload datatype the file is not accessible in the Media section of the backoffice. To prevent file redundancy, I will leave it disabled. It gets confusing, having files that are there, but can't be seen in the backoffice Media section.
urlPicker - XSLT question
uComponents has been a real blessing - thank you! The urlPicker is exactly what I was looking for. I'm once again failing in the XSLT department.. I don't understand how to output in XSLT correctly. I have:
But because I'm checking the "open in new window" I'm getting a url with a prefix of "true". How do I parse the info correctly?
Hi Laura,
The URL Picker stores its various properties in url-picker XML nodeset, so to access each property you'd use something like:
But, the datatype can store different types of URL's - media, content, string, etc - so the URL field can be different depending on the type. Here's a snippet I used in a past project to handle all different types, and the open in new window option:
Let us know if you have any questions
Thanks Tom, that works great.
Unrelated issue - I get an error when I try to save a link using Upload mode. I disabled it for now, but I might revisit it later. Where should it be saving if you use this?
The upload mode stores the value in the 'url' field just like the "URL" option, and (I believe) uploads the file to /media/<propertyid>/<file> just like the regular Upload datatype.
There is a known issue where if you save & publish twice without reloading the page you'll get an "Object reference..." error, could that be what you are experiencing? If so please vote up the issue. Otherwise what error are you getting and when?
Yes, you are right, the error was due to this known issue. I will vote the issue up. I tested it after a fresh page load and it uploads successfully into Media, though like the generic Upload datatype the file is not accessible in the Media section of the backoffice. To prevent file redundancy, I will leave it disabled. It gets confusing, having files that are there, but can't be seen in the backoffice Media section.
is working on a reply...