Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-2028

SimpleNavigationTag : add ability to wrap an anchor element with an html element

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.5.4
    • 3.5.3
    • taglibs
    • None

      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)

        Acceptance criteria

              pbaerfuss Philipp Bärfuss
              ryangardner Ryan Gardner
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: