[MAGNOLIA-558] cmsu:simpleNavigation Tag Creates Invalid HTML/XHTML Created: 03/Oct/05  Updated: 03/Oct/05  Resolved: 03/Oct/05

Status: Closed
Project: Magnolia
Component/s: taglibs
Affects Version/s: 2.1 Final
Fix Version/s: 2.1.1, 3.0 Beta 1

Type: Bug Priority: Minor
Reporter: Eric Everman Assignee: Fabrizio Giustina
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0.25d
Time Spent: Not Specified
Original Estimate: 0.25d
Environment:

All


Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

Using the simpleNavigation tag like this:

<cmsu:simpleNavigation startLevel="1" endLevel="1" style="simple-nav" />

results is this HTML (with angle braces turned to square braces) :

[span class="simple-nav"]
[ul class="level1"]
[li class="leaf"][a href="/author/Home/About.html">Child Page </a></li><li class="leaf"><a href="/author/Home/Birds.html"]Birds of a Feath[/a][/li]
...
[/ul]
[/span]

A UL tag cannot be nested in a SPAN tag since UL is a block element and SPAN is inline. There has been discussion on the developer's list to not emit a wrapper tag at all - just the UL tag with a css class assigned. Others have said that the wrapper tag should be switched to a DIV tag with the class assigned and that this keeps backwards compatability.

My own thoughts are that it does not make sense to have a tag output more then it needs to: If the purpose of the tag is to create a list, it should do just that. The user always has the ability to wrap the output as needed.

Also, that 'style' name is a bit misleading - how about 'class' or 'class-attrib' instead? Also, I would not be in favor of keeping the 'style' attribute around for the purpose of inserting actual css styling rules, since this can always be done more appropriately in the stylesheet. Inserting style rules in the html cripples the ability to create alternative stylesheets for palm devices, print formats, etc..



 Comments   
Comment by Fabrizio Giustina [ 03/Oct/05 ]

fixed in svn.
Now the value of the "style" parameter is added to the class attribute of the main ul tag. Will be released asap in 2.1.1

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