[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Menu






On Thu, May 9, 2013 at 5:52 PM, Brian Wolf <..hidden..> wrote:
I'm just starting on the LedgerSMB development list. Our clients have asked us to write enhancements to LedgerSMB.

We'd like to add a first-level menu item called Favorites.  Not hard to create a menu node using function select_menu(), and then adding a row in menu_attribute and menu_acl.  But, it doesn't operate as I would have expected.  The entire menu is now displayed as a child of the new Favorites menu option, even though the parent ID of Favorites is also zero.

This happens when generate_menu() pulls an empty menu for which you have permission.

To avoid this do not grant permission to menu_node entries which are menus.  Set only to the actual entries one needs to get work done (parent menus will be automatically included). 

To fix:  

delete from menu_acl where node_id in (select node_id from menu_attribute where attribute = 'menu');

Best Wishes,
Chris Travers

Can someone who has had some experience with menus point me in the right direction?

Thanks.
Brian

Brian Wolf
Email: ..hidden..
Try out Activus Secure Payments™, our recurring payments application.

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and
their applications. This 200-page book is written by three acclaimed
leaders in the field. The early access version is available now.
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
Ledger-smb-devel mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel