Copied to clipboard

Flag this post as spam?

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


  • Anthony Candaele 1197 posts 2049 karma points
    Sep 05, 2011 @ 10:12
    Anthony Candaele
    0

    testing for presence of related links

    Hi,

    I want to test for the presence of related links. If there are related links present, a title should be rendered.

    I tried this Xslt statement, but it doesn't work:

    <xsl:if test="string-length(currentPage/* [name() = propertyAlias]/links/link) &gt; 0">
          <h2>Related links</h2>
        </xsl:if>

    Can someone help me with this?

    Thanks,

    Anthony Candaele

  • Mike Chambers 636 posts 1253 karma points c-trib
    Sep 05, 2011 @ 10:23
    Mike Chambers
    0
    [name() = propertyAlias]

    did you change propertyAlias to your specific alias that you are using for you related links document parameter?

    :-)

  • Anthony Candaele 1197 posts 2049 karma points
    Sep 05, 2011 @ 10:36
    Anthony Candaele
    0

    Hi Mike,

    yes I did

    greetings,

    Anthony

  • Mike Chambers 636 posts 1253 karma points c-trib
    Sep 05, 2011 @ 10:41
    Mike Chambers
    0

    Just had a look at some of my xslt...

    <xsl:if test="count($currentPage/relatedItems/links/*) &gt; 0">

    that's what I have...

Please Sign in or register to post replies

Write your reply to:

Draft