Copied to clipboard

Flag this post as spam?

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


  • anthony hall 222 posts 536 karma points
    Apr 11, 2011 @ 15:35
    anthony hall
    0

    nodeTypeAlias 4.5

    I have the following xslt, i just wish to display nodeTypeAlias 'content'. 

    I've seen alot written about the change in this in 4.5 but can't work where to place '/content' on the following

     

    <xsl:for-each select="$currentPage/ancestor-or-self::*
     [@level=$level]/* [@isDoc and string(umbracoNaviHide) != '1']">
      <li>
     

      </li>
    </xsl:for-each>
  • Tom Fulton 2030 posts 4998 karma points c-trib
    Apr 11, 2011 @ 16:19
    Tom Fulton
    0

    Hi,

    You can substitute the * with the nodeTypeAlias of the doctype you want to select.  Example:

    <xsl:for-each select="$currentPage/ancestor-or-self::* [@level=$level]/content [@isDoc and string(umbracoNaviHide) != '1']">

    Another method is to use the local-name() function

    <xsl:for-each select="$currentPage/ancestor-or-self::* [@level=$level]/* [@isDoc and string(umbracoNaviHide) != '1'][local-name() = 'content']">

    More info:  http://our.umbraco.org/wiki/reference/xslt/45-xml-schema/no-more-@nodetypealias

    -Tom

Please Sign in or register to post replies

Write your reply to:

Draft