-
Bug
-
Resolution: Fixed
-
Major
-
4.3, 4.3.1, 4.2.4
-
None
-
None
This is related to MAGNOLIA-2851 and MAGNOLIA-3007. In the latter PageIterator.initContentIterator() was changed to begin with:
Content activePage = MgnlContext.getAggregationState().getCurrentContent();
This means that if you use the tag while a non-page content node is active, it will come up blank. That struck me as very odd when I ran across it. It seems more appropriate to change it to this:
Content activePage = MgnlContext.getAggregationState().getCurrentContent(); try { while (!activePage.getItemType().equals(ItemType.CONTENT)) { activePage = activePage.getParent(); } } catch (Exception e) { // oh well }
This will search up the tree until we find the page we're on, then iterate over its subpages. The try/catch is there because getParent() can throw JCR exceptions.
- caused by
-
MAGNOLIA-3007 PageIterator tag wrongly iterates on main content instead of current
- Closed
- supersedes
-
MAGNOLIA-2851 PageIterator tag wrongly iterates over children of the current paragraph instead of the page.
- Closed