[MAGNOLIA-2028] SimpleNavigationTag : add ability to wrap an anchor element with an html element Created: 26/Jan/08  Updated: 23/Jan/13  Resolved: 31/Jan/08

Status: Closed
Project: Magnolia
Component/s: taglibs
Affects Version/s: 3.5.3
Fix Version/s: 3.5.4

Type: New Feature Priority: Minor
Reporter: Ryan Gardner Assignee: Philipp Bärfuss
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File wrappingElement.patch     Text File wrappingElement.patch    
Template:
Acceptance criteria:
Empty
Date of First Response:

 Description   

For some effects, it is desirable to wrap the <a> element with an html element. A common use-case is for creating a certain kind of "tab" effect (using "sliding-door" image backgrounds) and having the anchor highlight the entire tab.

this patch adds an optional simple "wrapperElement" to the <cmsu:simpleNavigation> so that it can be used to output elements that are wrapped with a given tag. When the tag is used, the following output will result:

<cmsu:simpleNavigation startLevel="3" style="mystyle" wrapperElement="span"/>
Will output the following:
<ul class="level3 mystyle">
<li><span><a href="...">page 1 name </a></span></li>
<li><span><a href="...">page 2 name </a></span></li>
<li class="trail"><span><a href="...">page 3 name </a></span>
<ul class="level3">
<li><span><a href="...">subpage 1 name </a></span></li>
<li><span><a href="...">subpage 2 name </a></span></li>
<li><span><strong><a href="...">selected page name </a></span></strong></li>
</ul>
</li>
<li><span><a href="...">page 4 name </a></span></li>
</ul>

Any simple element can be specified, (such as "em", "strong", "span", "div"... etc)



 Comments   
Comment by Ryan Gardner [ 26/Jan/08 ]

fixed path used in the patch file

Comment by Philipp Bracher [ 31/Jan/08 ]

Applied. Thanks

Generated at Mon Feb 12 03:32:42 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.