Copied to clipboard

Flag this post as spam?

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


  • pawel 22 posts 42 karma points
    Jan 18, 2013 @ 19:12
    pawel
    0

    Check if there are related links

    Hi guys, 

    I would like to have a section with related articles and use related links xslt. it would be nice to have a header above 'Similar articles" but I would it to appear only if there are some links. Is there any easy way to check if there are any links and display heading only when there are?

    rgs,

    Pawel 

  • Charles Afford 1163 posts 1709 karma points
    Jan 18, 2013 @ 21:23
    Charles Afford
    0

    Hey.  Are you using xslt?.  Well all you need to do is look wether you have links in the releated item field.  Something like

    <xsl:choose>

    <xsl:when test="$currentPage/yourRelatedLinkField/links/link != ''>

    DISPLAY HEADER

    </xsl:if> 

    <xsl:otherwise>

    DONT DISPLAY HEADER

    </xsl:otherwise>

    Hope this helps.  Charlie :)

Please Sign in or register to post replies

Write your reply to:

Draft