tag:help-archives.hannonhill.com,2010-02-09:/discussions/velocity-formats/14094-display-content-from-block-choosers-allowing-multiplesCascade CMS: Discussion 2016-04-27T18:56:38Ztag:help-archives.hannonhill.com,2010-02-09:Comment/397453832016-04-27T17:48:11Z2016-04-27T17:48:11Zdisplay content from block choosers allowing multiples<div><p>Hi Lauren,</p>
<p>It looks like you are on the right track, but need to tweak your
XPath and loop slightly. When you have a moment, give the following
a try and let me know how it works out:</p>
<pre>
<code>#set ($pageSD = $_XPathTool.selectSingleNode($contentRoot, "/system-index-block/calling-page/system-page/system-data-structure"))
#set ($mainContent = $_XPathTool.selectSingleNode($pageSD, "mainContent"))
#set ($image = $_XPathTool.selectSingleNode($pageSD, "image/path").value)
#set ($locations = $_XPathTool.selectNodes($pageSD, "location"))
<div class="split3"><img src="${image}" /></div>
<div class="split23">$_SerializerTool.serialize($mainContent, true)
#if ($locations.size() > 0)
#foreach ($location in $locations)
$_SerializerTool.serialize($location.getChild("content"), true)
#end
#end
</div></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/397453832016-04-27T18:10:32Z2016-04-27T18:10:32Zdisplay content from block choosers allowing multiples<div><p>Thanks for the quick reply! The code you sent worked
perfectly.</p></div>lauren.frasertag:help-archives.hannonhill.com,2010-02-09:Comment/397453832016-04-27T18:56:37Z2016-04-27T18:56:37Zdisplay content from block choosers allowing multiples<div><p>Not a problem at all, Lauren. I am glad to hear the code I
provided did the trick..</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