-
Bug
-
Resolution: Fixed
-
Major
-
4.2, 4.2.1, 4.2.2, 4.1.4, 4.2.3
-
None
-
None
PageIterator tag has been modified for the issue MAGNOLIA-2851 but the change break its common usage.
MAGNOLIA-2851 says "PageIterator tag wrongly iterates over children of the current paragraph instead of the page" but the change does something pretty different: instead of iterating on the current content it iterates always on the main content (the page corresponding to the url).
This totally breaks its common usage (which is identical for other tags). For example we were used to draw a site map by doing:
<cms:loadPage path="/my/homepage" />
<cms:pageIterator>
in the past pageIterator was correctly iterating through pages into "/my/homepage", after upgrating to 4.2 now it always iterates on subpages of the current page/url. This also means there is no way to nest pageIterator tags for iterating on children of children and so on...
So the current code was definitively more similar to the old one (except for the deprecate Resource class usage):
private void initContentIterator() {
Content activePage = MgnlContext.getAggregationState().getCurrentContent();
instead of
private void initContentIterator() {
Content activePage = MgnlContext.getAggregationState().getMainContent();
- is causing
-
MAGNOLIA-3209 pageIterator no longer works unless the current node is a page
- Closed
- is related to
-
MAGNOLIA-2851 PageIterator tag wrongly iterates over children of the current paragraph instead of the page.
- Closed