Hi guys, i have created a text field called URL in Generic Properties tab in Document Types and i am trying to get it so that the user can type in the URL and it will place it on the page. What i want to know is, how do I use the text field within the <A Href=..." tag? I have tried all sorts including setting a variable to equal the alias URL and nothing seems to work other than hard coding the URL.
Thanks that works, any idea how to pull this from a sub page of the current page? It used to be that it filled a table in the parent page with page names of the sub pages and link to those pages from the table. I want it to work in the same way as this but to input the URL ourselves rather than it pulling it from the sub page automaticaly. It works with the 'teaser' box i have on the sub page to put a description of it in the right column but it is pulling the URL from the parent.
I was thinking the same thing. Been on the forum all day whilst doing my personal website, you can learn so much in here from so many talented people. The major difference between here and other forums I find is that people here are patient and haven't forgotten that at one point, they also knew nothing about xslt... and now they don't mind sharing their knowledge! Which makes for a sweet forum and another reason why umbraco rules!! :))
Using a text string in content manager to add URL
Hi guys, i have created a text field called URL in Generic Properties tab in Document Types and i am trying to get it so that the user can type in the URL and it will place it on the page. What i want to know is, how do I use the text field within the <A Href=..." tag? I have tried all sorts including setting a variable to equal the alias URL and nothing seems to work other than hard coding the URL.
Hi Simon
Try something like this:
The above code will grab the value from the textfield called "URL" and put into the href-attribute.
If you use the new XML schema the xslt will look like this:
Was this what you where looking for?
/Kim A
Thanks that works, any idea how to pull this from a sub page of the current page? It used to be that it filled a table in the parent page with page names of the sub pages and link to those pages from the table. I want it to work in the same way as this but to input the URL ourselves rather than it pulling it from the sub page automaticaly. It works with the 'teaser' box i have on the sub page to put a description of it in the right column but it is pulling the URL from the parent.
Nm i figured it out i put /node after $currentPage. Thanks for your help Kim, you're a legend.
Thanks Kim,
I needed the exact same thing :)
Sam.
You are welcome Sam. I think it's great when "older" posts still helps people out there!
/Kim A
I was thinking the same thing. Been on the forum all day whilst doing my personal website, you can learn so much in here from so many talented people. The major difference between here and other forums I find is that people here are patient and haven't forgotten that at one point, they also knew nothing about xslt... and now they don't mind sharing their knowledge! Which makes for a sweet forum and another reason why umbraco rules!! :))
Sam.
is working on a reply...