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

FreeMarker ?ancestors and ?root built-ins don't work

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Minor
    • None
    • 4.1.1
    • templating

    Description

      I wanted to use the FreeMarker ?ancestors built-in (http://freemarker.sourceforge.net/docs/ref_builtins_node.html) in a FreeMarker template. However, it doesn't seem to work. I added this:

      [#assign ancs = content?ancestors]

      But just this statement results in the following error:

      Can't get parent of I18nContentWrapper for website:/[rep:root]:root node doesn't have a parent

      I found the same goes for the ?root built-in:

      [#assign r = content?root]

      Just this assignment results in the same error message:

      Can't get parent of I18nContentWrapper for website:/[rep:root]:root node doesn't have a parent

      This bug was previously discussed on the Magnolia User-List: http://old.nabble.com/Problem-with-FreeMarker-built-in-for-ancestors-ts26334726.html

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                Unassigned Unassigned
                breun Nils Breunese
                Votes:
                3 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Bug DoR
                    Task DoD