When i,m on page cat 1 the sliders show all the nodes under cat 1 that is Item1.1, Item 1.2 and when i'm on page Cat 2 the slider shows the nodes under that cat (Item 2.1, Item 2.2)
Yeah I have been able to figure it out, I was using the wrong xslt template..thanks... by the way I have another question...my slideshow users some sort of bullet paging which I must increment manually with the known number of slides...how can I do thatdynamically in xslt, that is increment this number to match number of nodes...
</div> <!-- end of slides --> <div id="myController"> <span class="jFlowPrev">previous</span>
HERE I MUST ADD SPAN CLASSE USING XSLT WITH INCREMENT NUMBERS (1,2,3 etc..)according to number of nodes(Item1.1,1.2 etc..) under CAT 1 <span class="jFlowControl">1</span> <span class="jFlowControl">2</span>
--------------- <span class="jFlowNext">view next project</span>
</div> </div>
</xsl:template>
I was wondering if i could use the count feature..
Hi Chriztian, have been able to figure out how to repeat number of span according to number of nodes with this xslt
<div id="myController"> <span class="jFlowPrev">previous</span> <xsl:if test="count($nodes)"> <xsl:for-each select="$nodes"> <span class="jFlowControl">1</span> // need to increment this number here with a kinda loop. </xsl:for-each> </xsl:if> <span class="jFlowNext">view next project</span> </div>
Now i need to increment the numbers according to number of slides almost like a paging...got quite stuck on this one...any advice
Retrieve content from sub sub nav
Hi all,
I have my site structure like this :
Content
default
link1
link2
Cat 1
Item 1.1
Item 1.2
Cat 2
Item 2.1
Item 2.2
link3 etc...
Under cat 1 I have a slider to list item1.1, item 1.2 etc...same for each categories.
I don't quite figute how to write the xslt and thus create one macro to select the items under each sub nodes to put in the slider..
Any help out there?
thks,
//Sam
Hey Sam,
Not sure I fully understand.
To clarify, when you're on the Cat 2 page you want your slider to show Item 1.1 & Item 1.2?
Or you want the slider to show all categories when you're on the home page?
Rich
Rich,
When i,m on page cat 1 the sliders show all the nodes under cat 1 that is Item1.1, Item 1.2 and when i'm on page Cat 2 the slider shows the nodes under that cat (Item 2.1, Item 2.2)
Does this seem clear for you?
//Sam
Hey Sam,
Ok, this code will list the nodes, you just need to edit it for your needs.
<ul>
<xsl:for-each select="$currentPage/* [@isDoc and string(umbracoNaviHide) != '1']">
<li>
<a href="{umbraco.library:NiceUrl(@id)}">
<xsl:value-of select="@nodeName"/>
</a>
</li>
</xsl:for-each>
</ul>
fyi it's taken from the default "List Sub Pages from Current Page" xslt template that you can choose when creating a new xslt file in Umbraco.
Rich
What's up Rich ?
Yeah I have been able to figure it out, I was using the wrong xslt template..thanks... by the way I have another question...my slideshow users some sort of bullet paging which I must increment manually with the known number of slides...how can I do thatdynamically in xslt, that is increment this number to match number of nodes...
Here is my xslt :
<xsl:param name="currentPage"/>
<xsl:template match="/">
<div class="jflow-content-slider">
<div id="slides">
<xsl:for-each select="$currentPage/* [@isDoc and string(umbracoNaviHide) != '1']">
<!--to repeat-->
<div class="slide-wrapper">
<div class="slide-details">
img src="{projectPhoto}" width="850" height="380" alt="{@nodeName}" />
<div class="clear"></div>
</div>
<!--end of repeating element -->
</xsl:for-each>
</div>
<!-- end of slides -->
<div id="myController">
<span class="jFlowPrev">previous</span>
HERE I MUST ADD SPAN CLASSE USING XSLT WITH INCREMENT NUMBERS (1,2,3 etc..)according to number of nodes(Item1.1,1.2 etc..) under CAT 1
<span class="jFlowControl">1</span>
<span class="jFlowControl">2</span>
---------------
<span class="jFlowNext">view next project</span>
</div>
</div>
</xsl:template>
I was wondering if i could use the count feature..
Any idea?
//Sam
Hi Sam,
Just run through the same set again, using position() to output the number:
EDIT: Just saw that's not exactly what you need - but I'll take a closer look and update this...
/Chriztian
Ok Chriztian..await this..trying some testings on my side.
//Sam
Hi Chriztian, have been able to figure out how to repeat number of span according to number of nodes with this xslt
<div id="myController">
<span class="jFlowPrev">previous</span>
<xsl:if test="count($nodes)">
<xsl:for-each select="$nodes">
<span class="jFlowControl">1</span> // need to increment this number here with a kinda loop.
</xsl:for-each>
</xsl:if>
<span class="jFlowNext">view next project</span>
</div>
Now i need to increment the numbers according to number of slides almost like a paging...got quite stuck on this one...any advice
//Sam
Chriztian Just needed to put <xsl:value-of select="position()" /> like you advice to putpu the numbers.
Final xslt
<div id="myController">
<span class="jFlowPrev">previous</span>
<xsl:for-each select="$nodes">
<span class="jFlowControl"><xsl:value-of select="position()" /></span>
</xsl:for-each>
<span class="jFlowNext">view next project</span>
</div>
Works ok now.
is working on a reply...