Enable Wiki menus feature

22 views
Skip to first unread message

Alan Etkin

unread,
Jan 16, 2013, 12:27:58 PM1/16/13
to web2py-d...@googlegroups.com
A user might want to easily enable/disable the wiki menu with a command. This is almost trivial really (the current Wiki api provides it with two lines appended to the controller or model), however, since the shortcut auth.wiki(...) is being used for anything (serving the wiki interface, retrieving content and pre-defining models for crud) it would be convenient also to provide the menu feature consistently with the same command and extra arguments.

See this thread for more details: https://groups.google.com/d/topic/web2py/oCk997_BnDA/discussion

This complicates the code and adds redundancy (besides it tends to make the api more confusing) as commented in http://code.google.com/p/web2py/issues/detail?id=1281

I think that we could add an auth.settings.<...> options (menu_all, controller and function) to automagically add the wiki menu to each action, and have the Wiki class read the option to avoid duplicating the submenu. calls to auth.wiki() should overwrite the controller and function settings with those of the current object

Also, an auth.wiki("<menu>") command could be reserved to just return the submenu item.
Reply all
Reply to author
Forward
0 new messages