tag:help-archives.hannonhill.com,2010-02-09:/discussions/xslt-formats/825-adding-a-system-link-in-data-definition-and-appearing-on-pageCascade CMS: Discussion 2013-10-10T19:31:26Ztag:help-archives.hannonhill.com,2010-02-09:Comment/267333362013-05-07T15:55:34Z2013-05-07T15:55:34ZAdding a system link in Data Definition and appearing on page<div><p>Hi Matthew,</p>
<p>Looks like your if statement might need a minor adjustment.
Let's give this a shot:</p>
<pre>
<code><xsl:if test="count(whats-related/related-external[path != '/']) > 0">
<div id="RelatedArticles">
<h2>Web Extras and Other Related Articles:</h2>
<ul class="related-articles">
<xsl:for-each select="whats-related/related-external[path !='/']">
<li>
<a href="{path}"><xsl:value-of select="display-name"/></a>
</li>
</xsl:for-each>
</ul>
</div>
</xsl:if></code>
</pre>
<p>Please let me know if you have any questions.</p>
<p>Thanks</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/267333362013-05-07T17:18:53Z2013-10-10T19:31:26ZAdding a system link in Data Definition and appearing on page<div><p>well that worked well!</p>
<p>so what exactly does do?</p>
<pre>
<code><xsl:if test="count(whats-related/related-external[path != '/']) > 0"></code>
</pre>
<p>Why does a symlink need this while the path worked for a
page?</p></div>matthew.wrentag:help-archives.hannonhill.com,2010-02-09:Comment/267333362013-05-07T19:37:18Z2013-05-07T19:37:49ZAdding a system link in Data Definition and appearing on page<div><p><code><xsl:if test="count(whats-related/related-external[path
!= '/']) > 0"></code></p>
<p>This particular XPath is testing to see if you have at least one
Symlink chooser with a Symlink selected. This avoids potential
issues where there could be multiple empty choosers present.</p>
<p><code>whats-related/related-external[path !='/']</code></p>
<p>This XPath will filter out those empty choosers so you can loop
through chosen Symlinks.</p>
<p>I'm going to go ahead and close this discussion, please feel
free to comment or reply to re-open if you have any additional
questions.</p>
<p>Have a great day!</p></div>Ryan Griffith