tag:help-archives.hannonhill.com,2010-02-09:/discussions/velocity-formats/701-combining-two-nodesCascade CMS: Discussion 2013-03-12T02:32:56Ztag:help-archives.hannonhill.com,2010-02-09:Comment/256843442013-03-07T21:19:21Z2013-03-07T21:19:21ZCombining two nodes<div><p>I figured it out, thanks.</p></div>steelejtag:help-archives.hannonhill.com,2010-02-09:Comment/256843442013-03-07T21:33:15Z2013-03-07T21:33:15ZCombining two nodes<div><p>I guess I spoke too soon. I was able to combine the two nodes,
however, I could use a hand in ordering my results. You'll see from
the script, I'm listing the faculty in order of dean, chair,
faculty. I need to order them within those divisions alphabetically
by last name. Lend a hand?</p></div>steelejtag:help-archives.hannonhill.com,2010-02-09:Comment/256843442013-03-07T21:34:13Z2013-03-07T21:34:13ZCombining two nodes<div><p>I guess the script and xml might be of help.</p></div>steelejtag:help-archives.hannonhill.com,2010-02-09:Comment/256843442013-03-07T21:44:45Z2013-03-07T21:44:45ZCombining two nodes<div><p>Again, figured it out:</p>
<pre>
<code> $_SortTool.addSortCriterion("system-data-structure/staff/lname", "", "text", "ascending", "")
$_SortTool.addSortCriterion("system-data-structure/staff/fname", "", "text", "ascending", "")
$_SortTool.sort($list)</code>
</pre></div>steelejtag:help-archives.hannonhill.com,2010-02-09:Comment/256843442013-03-12T02:32:43Z2013-03-12T02:32:43ZCombining two nodes<div><p>Don't forget you can use the "or" clause in an XPath.</p>
<p>Your code:<br></p>
<pre>
<code>#set ( $busman = $_XPathTool.selectNodes($contentRoot,'/system-index-block//system-folder/system-page[system-data-structure/staff[dept="Business Management"]] | /system-index-block//system-folder/system-page[system-data-structure/staff[dept="Computer Science and Computer Networking"]]'))</code>
</pre>
<p>Another option:<br></p>
<pre>
<code>#set ( $busman = $_XPathTool.selectNodes($contentRoot,'/system-index-block//system-folder/system-page[system-data-structure/staff[dept="Business Management" or dept="Computer Science and Computer Networking"]]'))</code>
</pre></div>Charlie Holder