Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Sony 20 posts 40 karma points
    Apr 12, 2011 @ 12:32
    Sony
    0

    node's first child node

    hello friends,

    i have subnodes(say 10 subnodes) .each subnodes have 5 to 10 childnodes..

    how to  find each subnode's first child alone..

     

    thank you

  • gilad 185 posts 425 karma points
    Apr 12, 2011 @ 12:58
    gilad
    0

    I'm not sure but I think it can work

     


     
    <xsl:for-each select="$currentPage/* [@isDoc and string(umbracoNaviHide) != '1']">
    <xsl:for-each select="current()/* [@isDoc and string(umbracoNaviHide) != '1']">
     <xsl:if test="position() = 1">
                  { i am the first }
               </xsl:if>
    </xsl:for-each>
    </xsl:for-each>
  • elspiko 133 posts 302 karma points
    Apr 12, 2011 @ 13:04
    elspiko
    0

    Alternativly you could use:

    <xsl:for-each select="$currentPage/* [@isDoc and string(umbracoNaviHide) != '1']">
    <xsl:value-of select="current()/*[@isDoc and string(umbracoNaviHide) != '1'][1]"/>
    </xsl:for-each>

  • Sony 20 posts 40 karma points
    Apr 12, 2011 @ 13:52
    Sony
    0

    here are my nodes

    -home(home page)

          - gallery(subpage)

               -men wear(subpage)

                      -image1(picture documentype)

                      -imag2(picture documentype)

                -women wear(subpage)

                        -image3(picture documentype)

                        -imag4(picture documentype)

     

    i want to get the  image1, image3 as such.. i am using v4.0.3

     

    thank you

  • elspiko 133 posts 302 karma points
    Apr 12, 2011 @ 13:53
    elspiko
    0

    Whats the doctype alias for gallery?

    EDIT

    Either way it'll be something like...

    <xsl:for-each select="$gallery/node">
    Name: <xsl:value-of select="./node[1]/@nodeName" />
    </xsl:for-each>
    

    Where $gallery is the gallery node. You might wish to apply further filtering on doc types

  • Sony 20 posts 40 karma points
    May 23, 2011 @ 16:27
    Sony
    0

    if this could be done using razor?

Please Sign in or register to post replies

Write your reply to:

Draft