Hi tito,
Doubt this works, but it should give you an idea:
Create your db in your model....
Then in your conroller select your db and make it itterable...
menu = db(db.menu).select()
Then you can go over it and select all the items in the list.
{{for item in menu:}}
<a href="{{=item.link}}">{{=item.name}}</a>
{{pass}}
At least that's how I imagine it. You must one a pretty fancy menu.
Regards,
Jason
On Sun, 2009-05-17 at 22:23 -0300, Tito Garrido wrote:
> Hi...
>
> How can I use DB data on menu?
> I'd like to use db data to build a submenu on menu.py...
>
> Thanks!
>
> Tito
>
> --
> Linux User #387870
> .........____
> .... _/_õ|__|
> ..º[ .-.___.-._| . . . .
> .__( o)__( o).:_______
> Sent from Salvador, BA, Brazil
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---