I am new to umbraco and using umediaslider. using 4.7 version of umbraco. I made another umediaslider for my website. the xslt which I created is having same code of existing umediaslider. So, what change in that I have to do?
also, just confirming... that to use this, I have to insert its corresponding macro into template ... right?
... under content node I have created node AngerSlider with two sub nodes. what change in xslt I need to do... in template I have inserted macro of the above xslt.
Could you maybe show us your content tree? You probably just haveto change the xPath in the sliderNode-variable. But if You could show us your structure in the content section it would be a little easier. Just somthing like:
I the above example I'm using the node name to match, but a better way would probably be to use the document type alias, if the node has a unique document type.
Ohh by the way, the xPath that worked above can of course be used all over the site. That means that you can create nodes whereever you want in the content tree and the slider should still work. If not shout out loud :)
If you can mark one of the answers above as the solution it would be great, so that other users can see that this post is solved :)
umedia slider
I am new to umbraco and using umediaslider. using 4.7 version of umbraco. I made another umediaslider for my website. the xslt which I created is having same code of existing umediaslider. So, what change in that I have to do?
also, just confirming... that to use this, I have to insert its corresponding macro into template ... right?
Hi hetaurhet
Could you show us the code that you've got so far? I think this will help us help you.
And your second question - Yes, you need to insert the macro in one of your templates to make use of your XSLT code.
/Kim A
i have following umediaslider xslt code ...
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp " "> ]>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxml="urn:schemas-microsoft-com:xslt"
xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets" xmlns:tagsLib="urn:tagsLib" xmlns:BlogLibrary="urn:BlogLibrary"
exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets tagsLib BlogLibrary ">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:param name="currentPage"/>
<xsl:template match="/">
<!-- start writing XSLT -->
<xsl:variable name="sliderNode" select="$currentPage/parent::*/child::*[@level=1]"/>
<div id="slider">
<div id="imageSlider">
<xsl:for-each select="$sliderNode/child::umediaSlider">
<div class="imageSlide">
<div class="imageSliderInfo">
<h2> <xsl:value-of select="@nodeName"/></h2>
<xsl:value-of select="teaserText" disable-output-escaping="yes"/>
</div>
<div class="imageSliderImage">
<img src="{umbracoFile}" width="500" height="320" />
</div>
</div>
</xsl:for-each>
</div>
</div>
</xsl:template>
... under content node I have created node AngerSlider with two sub nodes. what change in xslt I need to do... in template I have inserted macro of the above xslt.
Could you maybe show us your content tree? You probably just haveto change the xPath in the sliderNode-variable. But if You could show us your structure in the content section it would be a little easier. Just somthing like:
- Content
-- Home
--- Some page
--- Another page
etc...
/Kim A
- content
-- main website node
--- Home
--- About us
---- who we are?
-- my img slider
this is the structure. where my img slider is umedia slider and which I want to use in 'who we are' content page.
Okay I guess that you've got the nodes under the "my img slider"-node?
To get the "my img slider"-node, you should be able to do like this:
I the above example I'm using the node name to match, but a better way would probably be to use the document type alias, if the node has a unique document type.
/Kim A
Thanks Kim it works now...........
Great to hear! I'm glad it works now.
/Kim A
Ohh by the way, the xPath that worked above can of course be used all over the site. That means that you can create nodes whereever you want in the content tree and the slider should still work. If not shout out loud :)
If you can mark one of the answers above as the solution it would be great, so that other users can see that this post is solved :)
/Kim A
yes its working for any level of node
is working on a reply...