simple system-page exclusion problem

zcummings's Avatar

zcummings

25 Nov, 2014 09:57 PM

Howdy, I have a problem.

Given a current-page that has a hierarchy of
<system-index-block>
    <system-folder>
        <things>...
    </system-folder>
    <system-page>
        <other-things>...
    </system-page>
</system-index-block>

How do I exclude the <system-page> from a simple template match?

<xsl:template match="system-folder">
<div class="left-menu">
<ul>
<li class="closed">
<xsl:if test="@current"><xsl:attribute name="class">closed</xsl:attribute></xsl:if>
<a href="{link}"><xsl:value-of select="name"/></a>
</li>
<xsl:apply-templates select="system-folder"/>
</ul>
</div>
</xsl:template>

It always includes the system-page no matter what test I include to try and exclude it.

Suggestions?

  1. 1 Posted by Ryan Griffith on 26 Nov, 2014 02:28 PM

    Ryan Griffith's Avatar

    Hi,

    I suspect the XSLT Format snippet you provided is not the culprit of the issue you described. I would suggest looking for a template that matches either / or /system-index-block. This template most likely has an <xsl:apply-templates> similar to the following, which is applying templates for both folders and pages at the top level:

    <xsl:apply-templates select="system-folder|system-page"/>
    

    Please let me know if you have any questions.

    Thanks!

  2. Ryan Griffith closed this discussion on 03 Dec, 2014 03:01 PM.

Discussions are closed to public comments.
If you need help with Cascade CMS please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

 

26 Aug, 2016 01:19 PM
25 Aug, 2016 03:02 PM
25 Aug, 2016 12:50 PM
24 Aug, 2016 08:43 PM
24 Aug, 2016 07:20 PM
21 Aug, 2016 01:20 PM