Add ability to tell SimpleNavigation to treat specified startLevel and
endLevel's as relative to active page through new a attribute
------------------------------------------------------------------------------------------------------------------------------------
Key: MAGNOLIA-2053
URL: http://jira.magnolia.info/browse/MAGNOLIA-2053
Project: Magnolia
Issue Type: Improvement
Components: taglibs
Affects Versions: 3.5.4
Reporter: Ryan Gardner
Assignee: Fabrizio Giustina
Priority: Minor
Attachments: AddRelativeModeToSimpleNav.patch
In some cases, it is desirable to have a SimpleNavigation that always shows the
children of a given page, or that always shows the siblings of a given page.
SimpleNavigation currently specifies the startLevel and endLevel in absolute
terms.
The attached patch adds an optional attribute to the SimpleNavigation tag that
allows you to specifiy the way the levels are handled. I called it
"levelHandlingMode" for lack of a better name, and when it is set to "relative"
the behavior is changed slightly. At the start of the doEndTag, it does this:
if (this.levelHandlingMode.equals(LEVEL_MODE_RELATIVE)) {
this.startLevel += activePageLevel;
this.endLevel += activePageLevel;
}
This simple change at the beginning of the doEndTag will allow you to specify
negative values for the start value or end value, and have it work
appropriately.
I've tested it for the use case that I wanted it to work for, and it works
properly... and, most importantly, it doesn't break any existing functionality.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.magnolia.info/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/docs/en/editor/stayupdated.html
----------------------------------------------------------------