tag:help-archives.hannonhill.com,2010-02-09:/discussions/velocity-formats/10783-format-returning-nothingCascade CMS: Discussion 2014-08-22T14:46:50Ztag:help-archives.hannonhill.com,2010-02-09:Comment/342240832014-08-21T17:58:11Z2014-08-21T17:58:11ZFormat returning nothing<div><p>Hi Joel,</p>
<p>It looks as though you may need to tweak the XPath used to
obtain the <code>$links</code> variable as well as the way you are
accessing the path of the <strong>ilink</strong> page.</p>
<p>When you have a moment, give the following a try and let me know
how it works out:</p>
<pre>
<code>#set ( $links = $_XPathTool.selectNodes($contentRoot, "/system-data-structure/link") )
<li style="list-style: none"></li>
#set ( $count = 0 )
#foreach ( $link in $links )
#if ( $link.getChild("ilink").getChild("path").value == "/" )
#set ( $linkpath = $link.getChild("elink").value )
#else
#set ( $linkpath = $link.getChild("ilink").getChild("path").value + ".html" )
#end
#set ( $linktitle = $link.getChild("linktitle").value )
#if ( $count > 0 )
<li style="list-style: none">
<hr style="padding:0; margin:0;"/>
</li>
#end
#set ($count = $_MathTool.add($count, 1))
<li style="link-style: none">
<a href="${linkpath}">${linktitle}</a>
</li>
#end</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/342240832014-08-22T14:45:16Z2014-08-22T14:45:16ZFormat returning nothing<div><p>This worked great, thanks! I see now the errors I was making.
Small ones, but they add up fast. Come check out our new homepage
next week! Powered 100% by Cascade Server!</p></div>Joel Traugertag:help-archives.hannonhill.com,2010-02-09:Comment/342240832014-08-22T14:46:49Z2014-08-22T14:46:49ZFormat returning nothing<div><p>Thank you for following up, Joel. I am glad to hear the changes
helped out.</p>
<p>I'll be sure to check out your site next week, congrats!</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