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]>
----------------------------------------------------------------

Reply via email to