Copied to clipboard

Flag this post as spam?

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


  • Klaus 47 posts 67 karma points
    Aug 15, 2011 @ 11:45
    Klaus
    0

    show subnode content in parent content area?

    Hi,

    Another great question. I have a parent node called Contact and two subpages with properties called Name, Phone, etc. 

    I would like to list all the subpages content (name, phone, etc) under the parent node.

    I have this code, but i don't know why is does not work?

    <xsl:output method="xml" omit-xml-declaration="yes"/>

    <xsl:param name="currentPage"/>

    <!-- Input the documenttype you want here -->
    <xsl:variable name="documentTypeAlias" select="string('Medarbejder')"/>

    <xsl:template match="/">

    <!-- The fun starts here -->
      <xsl:for-each select="umbraco.library:GetXmlAll()//node [string(data[@alias='umbracoNaviHide'] != '0')]">
          
            <xsl:value-of select="data [@alias = 'navn']" disable-output-escaping="yes"/>
            
    </xsl:for-each>

    </xsl:template>

    //Klaus

  • Fuji Kusaka 2203 posts 4220 karma points
    Aug 15, 2011 @ 12:01
    Fuji Kusaka
    0

    Hi Klaus,

    Try changing this

    <!-- Input the documenttype you want here -->
    <xsl:variable name="documentTypeAlias" select="string('Medarbejder')"/>

    <xsl:template match="/">

    <!-- The fun starts here -->
      <xsl:for-each select="umbraco.library:GetXmlAll()//node [string(data[@alias='umbracoNaviHide'] != '0')]">
          
            <xsl:value-of select="data [@alias = 'navn']" disable-output-escaping="yes"/>
            
    </xsl:for-each>

    to


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

     

     

     

  • Klaus 47 posts 67 karma points
    Aug 15, 2011 @ 12:38
    Klaus
    0

    Excellent, You are great at this XSLT. Thanks...

  • Fuji Kusaka 2203 posts 4220 karma points
    Aug 15, 2011 @ 12:40
    Fuji Kusaka
    0

    Good if it works :P

Please Sign in or register to post replies

Write your reply to:

Draft