[Lift] Re: Change to support dynamic top level menu items

2009-11-24 Thread philip
Hi David, Thanks. This is what works for me in my old fashioned non-functional way of programming. var sitemap:SiteMap = new SiteMap(Nil, MenuInfo.menu :_*) { override def buildMenu(current: Box[Loc[_]]): CompleteMenu = { val tmp = super.buildMenu(current) var childM

[Lift] Re: Change to support dynamic top level menu items

2009-11-24 Thread glenn
There is a "poor man's" approach to creating top-level menus dynamically. Simply create a number of hidden menus - guessing at the max number your app will likely need - whose text representation, paths and hidden attributes can be adjusted programatically as needed by the application. Not a very

Re: [Lift] Re: Change to support dynamic top level menu items

2009-11-24 Thread Ross Mellgren
I considered this but my problem was that you could not place them into the middle of a static flow, without rummaging around in the CompleteMenu looking for known MenuItems. For example, I was thinking in the CMS case that you probably want a static Home Menu and then some dynamic menus and

Re: [Lift] Re: Change to support dynamic top level menu items

2009-11-24 Thread David Pollak
Ross, You can dynamically add child elements right now: new SiteMap(menuItems) { override def buildMenu(current: Box[Loc[_]]): CompleteMenu = { val tmp = super.buildMenu(current) CompleteMenu(tmp.lines.toList ::: List(additional menus)) } } On Mon, Nov 23, 2009 at 5:16 PM, Ross

Re: [Lift] Re: Change to support dynamic top level menu items

2009-11-23 Thread Ross Mellgren
Understood. Thanks. -Ross On Nov 23, 2009, at 8:15 PM, David Pollak wrote: > > > On Mon, Nov 23, 2009 at 4:55 PM, Ross Mellgren wrote: > As much as I subscribe to the "a lack of dissent is implicit assent" policy, > I'm hoping somebody deeply familiar with SiteMap can comment on whether this

Re: [Lift] Re: Change to support dynamic top level menu items

2009-11-23 Thread David Pollak
On Mon, Nov 23, 2009 at 4:55 PM, Ross Mellgren wrote: > As much as I subscribe to the "a lack of dissent is implicit assent" > policy, I'm hoping somebody deeply familiar with SiteMap can comment on > whether this change seems like a bad idea? I guess if I don't hear anything > I'll create an iss

Re: [Lift] Re: Change to support dynamic top level menu items

2009-11-23 Thread Ross Mellgren
As much as I subscribe to the "a lack of dissent is implicit assent" policy, I'm hoping somebody deeply familiar with SiteMap can comment on whether this change seems like a bad idea? I guess if I don't hear anything I'll create an issue and submit the patch for review, but I'd feel better with

[Lift] Re: Change to support dynamic top level menu items

2009-11-22 Thread philip
Essential for the CMS I am programming as the user needs to be able to define the menu structure. On 11月22日, 上午4時46分, Ross Mellgren wrote: > In the recent thread, a couple people asked for the ability to create dynamic > menu items per request from the database. David suggested > Loc.supplimen