Oh shit, no I undestand why you created the list, it was a submenu you tried to create and my was for creating the main menu.

Why yours is failing I have no idea. Sorry.


Kenneth

So I have been playing with the idea of having some dynamic menus and I am a bit stuck... If a user is logged in and has created a conference then they should see an extra menu item with all of the conferences they are currently organizing.
I have this in the menu.py file...

if auth.is_logged_in():
users_conferences = db(db.conference.creator == auth.user.id).select(orderby = db.conference.name)
    if users_conferences:
        users_conferences_list = []
        for event in users_conferences:
users_conferences_list.append((event.name, False, URL( 'conference', 'enter', args = event.id), []) ) response.menu += [(T('My Conferences'), False, URL('default','my_conferences'), [
            users_conferences_list
            ])]

But I get a menu like this instead.

It's almost as if the menu item code is not executed but taken as an "almost literal string".
Must be something simple I am missing.
---
Best Regards,
Jason Brower


<<image/png>>

Reply via email to