Hello, in a JSP I need the Content of a parent page. Before 4.5.x the following Code did the job:
Content current = MgnlContext.getAggregationState().getCurrentContent(); paragraphList = ContentUtil.getOrCreateContent([b]current.getParent()[/b],paragraphListName, ItemType.CONTENTNODE, true); With 4.5.x there a some changes. Unfortunately I was not able the change my code to work again. Getting the content of the parent page is the problem. With the following code I'm on the level of the parent page, but the node itself is not the content node and I have no idea how to get "right content". AggregationState aggState = MgnlContext.getAggregationState(); Content current = aggState.getCurrentContent(); Content parent = current.getParent().getParent().getParent(); paragraphList = ContentUtil.getOrCreateContent(parent, paragraphListName, ItemType.CONTENTNODE, true); Grateful for each help. Regards, Barns -- Context is everything: http://forum.magnolia-cms.com/forum/thread.html?threadId=ee60cf5e-ad5e-4992-a096-f7a242358b53 ---------------------------------------------------------------- For list details, see http://www.magnolia-cms.com/community/mailing-lists.html Alternatively, use our forums: http://forum.magnolia-cms.com/ To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
