tag:help-archives.hannonhill.com,2010-02-09:/discussions/velocity-formats/14631-trying-to-get-a-format-to-workCascade CMS: Discussion 2016-10-02T02:45:10Ztag:help-archives.hannonhill.com,2010-02-09:Comment/405528812016-08-19T13:45:59Z2016-08-19T13:45:59ZTrying to get a format to work<div><p>Hi Fernando,</p>
<p>I noticed in your format that you're attempting to check this
here:</p>
<pre>
<code>#set($umsldailyYesNo = $_XPathTool.selectSingleNode($contentRoot, "//system-data-structure/slide/umsldaily1").value)
#if($umsldailyYesNo == "Yes")
...
#else
...
#end</code>
</pre>
<p>I think what might be happening is that you're effectively
checking the same <code>selectSingleNode</code> in every iteration
of your loop. You need to scope your XPath there to either use your
current slide as the context or to specifically access that
<code>umsldaily1</code> node by name as you're doing above for this
other field:<br></p>
<pre>
<code>#set($link = $_EscapeTool.xml($slide.getChild("symlink").getChild("content").getChild("system-symlink").value))</code>
</pre>
<p>Currently, you're checking the same value for the first slide
over and over again.</p>
<p>Let me know if that makes sense.</p>
<p>Thanks!</p></div>Bradley Wagner