Menu.builder li_item being applied to all?

5 views
Skip to first unread message

Richard Dallaway

unread,
Aug 25, 2009, 8:48:39 AM8/25/09
to lif...@googlegroups.com
I've been running "mvn -o" for a while, but didn't today and noticed a
change in behaviour for the menu builder (1.1 SNAPSHOT). I'm seeing
all my menus being given the selected item class, not just the one
that's selected for the page you're on. I'm using...

<lift:Menu.builder li_item:class="current_tab" />

I've cut my site map down to this...

val menus = Menu(Loc("one", new Link("index" :: Nil, false), "Page 1")) ::
Menu(Loc("two", new Link("index2" :: Nil, false), "Page 2")) :: Nil

LiftRules.setSiteMap(SiteMap(menus:_*))

...and I see the following output:

<ul><li class="current_tab"><a href="/index">Page 1</a></li><li
class="current_tab"><span>Page 2</span></li></ul>

I'd expect only one of the li elements to have the class attribute.

Am I doing something wrong here?

Thank you
Richard

george

unread,
Aug 25, 2009, 12:34:43 PM8/25/09
to Lift

David Pollak

unread,
Aug 25, 2009, 4:55:02 PM8/25/09
to lif...@googlegroups.com
I think I've fixed my bone-headed attempt to fix another issue.
--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp

Timothy Perrett

unread,
Aug 25, 2009, 5:24:46 PM8/25/09
to Lift
Whenever I find myself having thoughts such as these its categorically
time to start writing better tests ;-)

Cheers, Tim

On Aug 25, 9:55 pm, David Pollak <feeder.of.the.be...@gmail.com>
wrote:

Richard Dallaway

unread,
Aug 26, 2009, 1:20:59 AM8/26/09
to lif...@googlegroups.com
I can confirm that your fix of the fix has fixed my issue (which means
I've grabbed the latest 1.1 snapshot and it's all good again)

Thank you
Richard
Reply all
Reply to author
Forward
0 new messages