Yes,

I would like the expandAll behavior to work for groups and for non-
root siteMaps.
Here's a specific use-case. The MenuWidget in the lift-widgets package
just passes everything
through  as

def render : NodeSeq = {
    head ++ <lift:Menu.builder expandAll="true" top:class=
{style.toString} />
  }

So, even though the MenuWidget object has factory methods
for using a  non-root siteMap, only the root siteMap is ever used.
That's
because Menu.builder calls a private function renderWhat, like so:

val toRender = renderWhat(expandAll)

which iterates through the root siteMap. There is no way, really, to
subclass that
to use a different siteMap.

The problem with the Menu.group snippet is that it just works off the
named group in
the root siteMap, creating a parent node, but not the kids.

It would be nice to use MenuWidget, or some subclass, to create a
superfish-style
nav-bar or horizontal menu for groups or non-root siteMaps just as
easily as for the
entire root siteMap.

Glenn...

On Jun 8, 3:51 pm, Joe Wass <j...@folktunefinder.com> wrote:
> What I really wanted was a menu group. Doing things in groups has
> solved my particular question.
>
> Glenn, can you not just use groups? Do you need the hierarchal
> behaviour of nested menus?
>
> Joe
>
> On Jun 8, 10:24 pm, glenn <gl...@exmbly.com> wrote:
>
> > I have a similar request: namely, being able to apply expandAll="true"
> > attribute
> > not just to <lift:Menu.builder.../>
>
> > but to <lift:Menu.group name="mygroup"/> and <lift:Menu.item
> > name="myMenu"/>, or, as Joe requests below,
>
> > to any siteMap that is not the root siteMap.
>
> > Glenn...
>
> > On Jun 8, 2:06 pm, Joe Wass <j...@folktunefinder.com> wrote:
>
> > > Sorry for yet another menu question. I have scoured this list first, I
> > > promise!
>
> > > I'm trying to do something I think is quite simple:
>
> > > Two [or any nuumber of] menus (with children). Two different
> > > templates. One menu and children shows up on one template, one shows
> > > up on another. They are each nested menus (i.e. I have two Menus, each
> > > with child menu items). You can directly go to any page you want, but
> > > only certain Menu items show up on certain templates.
>
> > > I had thought I could put a guard (the last argument of the Loc) to
> > > only show a menu when the request string contains part of the path,
> > > but of course, that prevents you from navigating there in the first
> > > place so that's out.
>
> > > I've seen this post 
> > > :http://groups.google.com/group/liftweb/browse_thread/thread/dbdf6a17b...
>
> > > but it doesn't quite do what I want: I want to be able to show a whole
> > > Menu at a time, not have to list each individual item in the template.
> > > I'd like to do something like this:
>
> > > <lift:Menu.builder menuName="menu_name"/>
>
> > > Any ideas? I'll accept a hack, I'm short on time!
>
> > > Bonus marks: how do you set a menu to be expanded by default (without
> > > having to be on the root node's page)? I saw `expandAll="true"`
> > > somewhere, but that doesn't do anything...
>
> > > Thanks!
>
> > > Joe

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to