Copied to clipboard

Flag this post as spam?

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


  • Eric Warren 48 posts 68 karma points
    Aug 31, 2010 @ 15:50
    Eric Warren
    0

    Display Pages based on Doc Type

    So i am trying to list pages in a footer that will be on every page.  I am still learning the new schema and not sure what is going wrong.  I have a document type that is nested below a base page document type with just meta info.

    I had this working with the old XML Schema but just can figure it out with the new schema.  I am using the auto generated XSLT "List pages by doc Type".  Any thought on whats going on.  

     

    <!-- Input the documenttype you want here -->

    <xsl:variable name="documentTypeAlias" select="string('eventPage')"/>

    <xsl:template match="/">

    <!-- The fun starts here -->

    <ul>

    <xsl:for-each select="$currentPage/* [name() = $documentTypeAlias and string(umbracoNaviHide) != '1']">

    <li>

    <a href="{umbraco.library:NiceUrl(@id)}">

    <xsl:value-of select="@nodeName"/>

    </a>

    </li>

    </xsl:for-each>

    </ul>

    </xsl:template>

     

  • Dan 1285 posts 3917 karma points c-trib
    Aug 31, 2010 @ 16:20
    Dan
    0

    That code looks okay.  You sure you have the casing right on the doc type alias?  Also, try republishing the entire site, as cacheing can sometimes be an issue.

  • Eric Warren 48 posts 68 karma points
    Aug 31, 2010 @ 16:37
    Eric Warren
    0

    OK,  That seems to work when i navigate to the page.  I just need to change my Xpath to access for any page

Please Sign in or register to post replies

Write your reply to:

Draft