Currently i have "hard coded" the base url into my xslt file, but that requires changing the value if the site is deployed to a differnt site (or an error if i forget).
Is there a better method of extracting the URL in xslt?
Oh yeah.. I am aware of prettyurl, but suspect it can't be used here as the url i am trying to build includes a file uploaded with the document via an upload datatype.
My understanding or prettyurl is that it requires the id of the resource it is building a url for and i dont think the uploaded file has an id i can reference. (please correct me if i am wrong)
Not sure what the issue is, as your syntax looks correct.
Try adding "?umbDebugShowTrace=true" to your page's URL - make sure that you're Web.config's appSetting "umbracoDebugMode" is set to "true" ... then scroll down until you find any error messages (should be in red text).
I'm just going to point out that there's a typo in the name of the <xsl:variable> tag (look close) - just to be sure that that's not the issue :-)
Other than that - are you trying to link to a file, or is it a little bit different? If you're not doing any QueryString manipulations, I don't see why it shouldn't be possible to combine NiceUrl() and maybe a call to GetMedia() for it (but I obviously don't know your exact use-case yet).
Chriztian.. Great spot. Yep.. naming a variable varaible sure does make things break and Lee. Thanks for the debugging tip! - that is something i know i will be able to use in the future.
Problem with RequestServerVariables('HTTP_HOST')"
When I add this call to my xslt it cause the xslt to throw an error. (I don't even need to reference the variable)
<xsl:varaible name='siteurl' select="umbraco.library:RequestServerVariables('HTTP_HOST')" />
Any ideas?
Currently i have "hard coded" the base url into my xslt file, but that requires changing the value if the site is deployed to a differnt site (or an error if i forget).
Is there a better method of extracting the URL in xslt?
TIA
Rob
Oh yeah.. I am aware of prettyurl, but suspect it can't be used here as the url i am trying to build includes a file uploaded with the document via an upload datatype.
My understanding or prettyurl is that it requires the id of the resource it is building a url for and i dont think the uploaded file has an id i can reference. (please correct me if i am wrong)
Hi Rob,
Not sure what the issue is, as your syntax looks correct.
Try adding "?umbDebugShowTrace=true" to your page's URL - make sure that you're Web.config's appSetting "umbracoDebugMode" is set to "true" ... then scroll down until you find any error messages (should be in red text).
Let us know what you find - it might be fixable.
Cheers, Lee.
Hi Rob,
I'm just going to point out that there's a typo in the name of the <xsl:variable> tag (look close) - just to be sure that that's not the issue :-)
Other than that - are you trying to link to a file, or is it a little bit different? If you're not doing any QueryString manipulations, I don't see why it shouldn't be possible to combine NiceUrl() and maybe a call to GetMedia() for it (but I obviously don't know your exact use-case yet).
/Chriztian
Thanks guys..
Chriztian.. Great spot. Yep.. naming a variable varaible sure does make things break and Lee. Thanks for the debugging tip! - that is something i know i will be able to use in the future.
Rob
is working on a reply...