xslt - CMS umbraco - xsl descendant -


i have page folder , links inside

-firstpage   +folder   -page   -page   -folder     -link1     -link2     -link3   -page 

i want reach link1,link2,link3 in tree. current page firstpage. how do that?? xsl wrote , give me first link in top folder

<xsl:template match="/"> <xsl:for-each select="$currentpage/descendant-or-self::* [@isdoc][@level=2]"> <xsl:if test="count(current()/descendant::* [@isdoc]) &gt; 0"> <xsl:variable name="descendantpage" select="current()/descendant::* [@isdoc]"/>    <xsl:value-of select="$descendantpage/text"/> </xsl:if> </xsl:for-each> </xsl:template> 

thank help.

edit:new xsl use...

<xsl:variable name="fid" select="number(1395)" /> <xsl:variable name="linksfolder" select="$currentpage/descendant-or-self::* [@isdoc][@level=2][@id='$fid']"> <xsl:template match="/">   <xsl:for-each select="$linksfolder/* [@isdoc]">     <xsl:value-of select="./text">   </xsl:for-each> </xsl:template> 

how can avoid use output (like id of folder) folder want to? help...

there lots of helpful tips & tricks in umbraco wikibook online (http://en.wikibooks.org/wiki/umbraco/various_useful_xslt_methods_in_umbraco). can use doc type of folder node find links (instead of id).

for example looping round nodes of doc type (linkfolderdoctype):

<xsl:for-each select="$currentpage/ancestor-or-self::root//node [@nodetypealias='linkfolderdoctype']">   <xsl:value-of select="./text"> </xsl:for-each> 

Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -