Hello everyone. I have a slide on the front page of a slide which rotates images by nodes selected by a macro paramter (source). Everything works fine except for the media picker.None of the images show up.I guess I made some improvements to the code and the
<!-- Don't change this, but add a 'contentPicker' element to --> <!-- your macro with an alias named 'source' --> <xsl:variable name="source" select="/macro/source"/>
To troubleshoot you can add this line to dump out the contents of slideImage, so you can see if it's properly retrieving the media item and it has an umbracoFile property. Try adding that and paste the results here
Notice the curly braces around the $slideImage variable - to have the XSLT code get executed inside the normal HTML you'll need to wrap in these braces
<!-- Don't change this, but add a 'contentPicker' element to --> <!-- your macro with an alias named 'source' --> <xsl:variable name="source" select="/macro/source"/>
It Worked. I hope this code will help many others. Here is a run down on what I was trying achive incase others would like to do the same
1. I have a javascript image slider on front page that displays a Course Title and Description. 2. In the Document Sets I would like to be able to change the image based on the course. (Pic of classroom, etc)
3. The macro has a source parameter which means your subnodes could be anywhere within your site
<!-- Don't change this, but add a 'contentPicker' element to --> <!-- your macro with an alias named 'source' --> <xsl:variable name="source" select="/macro/source"/>
Either of those blocks should work fine (although you need to add the curly braces in the first).
But if you change the alias of a property on a document type (ie slideImage to slideImageID), you'll need to re-publish any documents using that property for the change to take effect in the cache.
Media Picker for Slide Image not showing
Hello everyone. I have a slide on the front page of a slide which rotates images by nodes selected by a macro paramter (source). Everything works fine except for the media picker.None of the images show up.I guess I made some improvements to the code and the
"Front Page Course Slider"
shows on the front page but not the image.
The media picker has a alias of:
slideImage
Can anyone tell me what I'm doing wrong?
Thanks for your help!
Hi,
Seems like it should work.
To troubleshoot you can add this line to dump out the contents of slideImage, so you can see if it's properly retrieving the media item and it has an umbracoFile property. Try adding that and paste the results here
-Tom
Thanks Tom. I get the following:
Sorry, I missed the problem in your first post :)
Change the img line to:
Notice the curly braces around the $slideImage variable - to have the XSLT code get executed inside the normal HTML you'll need to wrap in these braces
-Tom
Since my first post I changed the ID to
slideImageID
and used info from
http://blog.leekelleher.com/2010/08/11/how-to-use-umbraco-library-getmedia-in-xslt-for-umbraco-v4-5/
But still no go
Thank you Tom!!
It Worked. I hope this code will help many others. Here is a run down on what I was trying achive incase others would like to do the same
1. I have a javascript image slider on front page that displays a Course Title and Description.
2. In the Document Sets I would like to be able to change the image based on the course. (Pic of classroom, etc)
3. The macro has a source parameter which means your subnodes could be anywhere within your site
Thanks Again
Here is the complete code with corrections
Either of those blocks should work fine (although you need to add the curly braces in the first).
But if you change the alias of a property on a document type (ie slideImage to slideImageID), you'll need to re-publish any documents using that property for the change to take effect in the cache.
is working on a reply...