tag:help-archives.hannonhill.com,2010-02-09:/discussions/velocity-formats/10193-pulling-multi-select-values-on-folder-index-pageCascade CMS: Discussion 2015-08-07T12:59:20Ztag:help-archives.hannonhill.com,2010-02-09:Comment/336225902014-07-02T01:12:28Z2015-08-07T12:59:20ZPulling multi-select values on folder index page<div><p>Hi,</p>
<p>I'm having problems with getting checkbox values from multiple
pages using an index block for the current folder. I can get the
values, but they're returned in a single string. How do I separate
the values in the string, or properly call the values from the
other pages?</p>
<p>Eg. On the individual program pages, if the checkbox values are
'Undergraduate' and 'International'. On the indexed page (which
gets data from all of the individual pages in the same folder, for
publishing to an xml file), the returned value is
'UndergraduateInternational'.</p>
<p>The format for the indexed page is attached. Thanks!</p></div>Joycetag:help-archives.hannonhill.com,2010-02-09:Comment/336225902014-07-07T14:23:56Z2014-07-07T14:23:56ZPulling multi-select values on folder index page<div><p>Hi Joyce,</p>
<p>It sounds as though using <code>getChild().value</code> is just
merging the values of each selected value. I believe the easiest
way to access the values is to use the XPath Tool, which will
return an array that you can loop over.</p>
<p>When you have a moment, give the following a try and let me know
how it works out:</p>
<pre>
<code>#set ( $types = $_XPathTool.selectNodes($page, "system-data-structure/type/value") )
#if ($types.size() > 0)
#foreach ($type in $types)
## output the value
$type.value
#end
#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/336225902014-07-09T16:32:41Z2015-08-07T12:59:20ZPulling multi-select values on folder index page<div><p>That worked, thanks as always!</p>
<p>Joyce</p></div>Joycetag:help-archives.hannonhill.com,2010-02-09:Comment/336225902014-07-09T18:41:35Z2014-07-09T18:41:35ZPulling multi-select values on folder index page<div><p>Not a problem at all, Joyce, thank you for following up. I am
glad to hear I was able to point you in the right direction.</p>
<p>Have a great day!</p></div>Ryan Griffith