Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi guys,
I'm currently trying out Umbraco... love it so far.
I've got stuck at a hurdle though. I'm looking to use a content picker to be able to pick different "widgets" to put onto a page.
I added a "content picker" to my homepage, which is all good... I then selected the widget that I made (just a few lines of text, fine...
In my macro, I need to insert the following text to be able to display my content on the page...
<xsl:value-of select="umbraco.library:GetXmlNodeById(1098)" disable-output-escaping="yes" />
This works great, but as you can see, the ID is hard-coded in there... I want that ID to come from the content picker (alias is homewidget1)
I have tried <xsl:value-of select="$currentPage/homewidget1" /> but that doesn't work...
Any pointers?
Thanks,
Gary :)
Hi Gary
A handy debug "tool" within xslt is to output the xml data within a textarea. This can be achieved as follows:
<textarea><xsl:copy-of select="$currentPage"/></textarea>
You can use it on specific node data too if the node data is in xml format - I have found it invaluable in working out the correct syntax.
http://our.umbraco.org/projects/backoffice-extensions/ucomponents is worth a look too - as you are adding "widgets" the multi node picker in the uComponents package is a must have.
Good luck.
Cheers
Nigel
Oh wow, now THAT is handy :)
I usually use PHP, and would often just echo out something to see what it contains... so this will help me hugely. Especially now as I set it to 'widget1' and not 'homewidget1' as I thought I did!
I'll check out the ucomponents link there now.
Thanks again,
Gary
Pleased the info has been a help.
I too used to solely code in php but since starting with Umbraco, it is hard to go back.
So in 30 minutes, I managed to get exactly what I needed done (and spent all day trying myself yesterday!)
Thanks again for your help - ucomponents was exactly what I was after!
Maybe mark one of the replies as the solution - just a housekeeping task...
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
n00b, stuck with content picker
Hi guys,
I'm currently trying out Umbraco... love it so far.
I've got stuck at a hurdle though. I'm looking to use a content picker to be able to pick different "widgets" to put onto a page.
I added a "content picker" to my homepage, which is all good... I then selected the widget that I made (just a few lines of text, fine...
In my macro, I need to insert the following text to be able to display my content on the page...
<xsl:value-of select="umbraco.library:GetXmlNodeById(1098)" disable-output-escaping="yes" />
This works great, but as you can see, the ID is hard-coded in there... I want that ID to come from the content picker (alias is homewidget1)
I have tried <xsl:value-of select="$currentPage/homewidget1" /> but that doesn't work...
Any pointers?
Thanks,
Gary :)
Hi Gary
A handy debug "tool" within xslt is to output the xml data within a textarea. This can be achieved as follows:
You can use it on specific node data too if the node data is in xml format - I have found it invaluable in working out the correct syntax.
http://our.umbraco.org/projects/backoffice-extensions/ucomponents is worth a look too - as you are adding "widgets" the multi node picker in the uComponents package is a must have.
Good luck.
Cheers
Nigel
Oh wow, now THAT is handy :)
I usually use PHP, and would often just echo out something to see what it contains... so this will help me hugely. Especially now as I set it to 'widget1' and not 'homewidget1' as I thought I did!
I'll check out the ucomponents link there now.
Thanks again,
Gary
Hi Gary
Pleased the info has been a help.
I too used to solely code in php but since starting with Umbraco, it is hard to go back.
Cheers
Nigel
So in 30 minutes, I managed to get exactly what I needed done (and spent all day trying myself yesterday!)
Thanks again for your help - ucomponents was exactly what I was after!
Hi Gary
Maybe mark one of the replies as the solution - just a housekeeping task...
Cheers
Nigel
is working on a reply...