[JIRA] Updated: (MAGNOLIA-2053) Add ability to tell SimpleNavigation to treat specified startLevel and endLevel's as relative to active page through new a attribute

View: New views
1 Messages — Rating Filter:   Alert me  

[JIRA] Updated: (MAGNOLIA-2053) Add ability to tell SimpleNavigation to treat specified startLevel and endLevel's as relative to active page through new a attribute

by Magnolia - Dev mailing list :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ http://jira.magnolia.info/browse/MAGNOLIA-2053?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ryan Gardner updated MAGNOLIA-2053:
-----------------------------------

    Attachment: levelhandling.patch

Updated the patch to work against the 3.6.2 trunk version. Also added in the ability to set the anchorID of it. (I had these two split out into two separate patches, but it was difficult to work with two changesets so I just spat out one patch.)

> 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, levelhandling.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/
----------------------------------------------------------------
LightInTheBox - Buy quality products at wholesale price!