Hi Nils,

Looks like a bug to me (or at least something we should support/handle in Magnolia). It would help if you could report this on Jira; what would help *a lot*, is if you could add a (failing) test to info.magnolia.freemarker.FreemarkerHelperTest (in magnolia-core) to demonstrate this.

Cheers,

-g

On Nov 13, 2009, at 3:20 PM, Nils Breunese wrote:


Nils Breunese wrote:

I tried to work around using ?ancestors by using ?parent in a list loop, but I ran into the exact same error message trying to do that. My goal is to get a reference to the home node for an arbitrary page.
Since ?ancestors is giving me an error, I tried this as a workaround:
----
[#-- Find the home node --]
[#assign current = content]
[#assign home = current]
[#list 1..100 as level]
        [#assign current = current?parent]
        [#if current?parent??]
                [#assign home = current]
        [#else]
                [#break]                
        [/#if]
[/#list]
----
This gives me the same FreeMarker template error I get when I try to use ?ancestors:
----
Can't get parent of I18nContentWrapper for website:/[rep:root]:root node doesn't have a parent
----

Even [#assign r = content?root] returns the above error message. Can anyone confirm that either the ?ancestors or ?root built-in is working for them?

Nils Breunese.

----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------


----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to