Pulling multi-select values on folder index page

Joyce's Avatar


02 Jul, 2014 01:12 AM


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?

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'.

The format for the indexed page is attached. Thanks!

  1. 1 Posted by Ryan Griffith on 07 Jul, 2014 02:23 PM

    Ryan Griffith's Avatar

    Hi Joyce,

    It sounds as though using getChild().value 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.

    When you have a moment, give the following a try and let me know how it works out:

    #set ( $types = $_XPathTool.selectNodes($page, "system-data-structure/type/value") )
    #if ($types.size() > 0)
        #foreach ($type in $types)
            ## output the value

    Please let me know if you have any questions.


  2. 2 Posted by Joyce on 09 Jul, 2014 04:32 PM

    Joyce's Avatar

    That worked, thanks as always!


  3. 3 Posted by Ryan Griffith on 09 Jul, 2014 06:41 PM

    Ryan Griffith's Avatar

    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.

    Have a great day!

  4. Ryan Griffith closed this discussion on 09 Jul, 2014 06:41 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac