hi,

is there any performance impact when put menu in controller? i know i can 
modify the menu.py or create the new file menu_custom.py in models but i 
don't want to change default web2py file scaffolding generated as much as 
possible.

for example
*controllers/default.py*
*
*
# -*- coding: utf-8 -*-

# menu
response.menu = [
    (T('Home'), False, URL('default', 'index'), []),
    (T('Room'), False, URL('default', 'room'), []),
    (T('Guest'), False, URL('default', 'guest'), []),
    (T('Booking'), False, URL('default', 'booking'), []),
    (T('Check In'), False, URL('default', 'check_in'), []),
    (T('Check Out'), False, URL('default', 'check_out'), []),
    (T('Repairing'), False, URL('default', 'repairing'), []),
    (T('Cleaning'), False, URL('default', 'cleaning'), []),
]

if auth.user and auth.has_membership(role='Manager'):
    response.menu.append((T('Branch'), False, URL('default', 'branch')))
    response.menu.append((T('Company'), False, URL('default', 'company')))

DEVELOPMENT_MENU = False

thousand thanks in advance

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to