Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-3713

Add a possibility to iterate selected values of the checkbox control in freemarker template

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Not an issue
    • Icon: Neutral Neutral
    • None
    • None
    • freemarker
    • None

      There is no possibility to display selected values of the checkbox type control in a FM template - if I have checkbox control named e.g. "mycheckbox" with some options and at least one option is checked,

      ${content.mycheckbox}

      is not empty, but it displays "mycheckbox" string, and it is not possible to use it in #list (

      [#list content.mycheckbox as mc]

      throws error).

      In a JSP template I can use the way described in http://wiki.magnolia-cms.com/display/WIKIARCHIVE/Displaying+values+from+checkbox+control but there is no such possibility in a FM template. Using

      [#list cmsfn.nodeDataIterator(cmsfn.currentParagraph, "status") as s]

      throws "freemarker.core.InvalidReferenceException: Expression cmsfn.nodeDataIterator is undefined" error.

        Acceptance criteria

              Unassigned Unassigned
              jchocholacek Jozef Chocholacek
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Task DoD