Fixes to Menu.item and SiteMap.buildLink
Per Debilski (http://groups.google.com/group/liftweb/browse_thread/thread/5d6c6733c6a47ff6)
I think I’ve found two issues with Menu.item. The first is that currently part of the code is case (Full(loc), _, _) if loc.name == name => { if (S.attr("donthide").isEmpty) Text("") if (!text.isEmpty) Group(text) else Group(loc.linkText openOr Text(loc.name)) } i.e. in my opinion, checking for the ‘donthide’ attribute does not change anything. The second seems to come from SiteMap.buildLink. When building a link, it is checked for nodeseq.text.length > 0 with the effect that <lift:Menu.item name="home"><img src="logo.png" /></lift:Menu.item> shows no image but the default text. But, when surrounded with spaces <lift:Menu.item name="home"> <img src="logo.png" /> </lift:Menu.item> it shows the logo as it should.
Leave a comment
Also, Kajo Marton:
I have a little desire, if could be possible:
in the documentation to <lift:Menu.item /> there is note, that
" Normally, the Menu item is not shown on pages that match its Menu's
Loc. "
It would be awesome, if I could use some attribute to force this
behaviour and show generated link even on page that match its Menu's
Loc.
I suggest use same attribute as exists in <lift:Menu.builder /> -
linkToSelf="true"
thanks for considering.
on 2011-01-28 17:59 *
By dchenbecker
Status changed from Accepted to Fixed
Work remaining changed from 2.0 to 0.0
(In revision:b349bbaebe283fcf4abc04959e5d7f84035d22d9) Fix Menu.item to support linkToSelf, donthide, and img links
Closes #857
Branch: master
Closes #857
Branch: master