menu

31 views
Skip to first unread message

Lucas

unread,
Aug 29, 2025, 3:02:25 PM (10 days ago) Aug 29
to py4web
hello one and all,

so i think i read that there is no standard menu system in py4web like there was in web2py.  

but I'd like to implement a menu fixture or some kind of top center flexible menu system and has anyone done it successfully in py4web and would like to share their code?

thank you in advance, Lucas

Massimo DiPierro

unread,
Sep 1, 2025, 12:10:59 PM (7 days ago) Sep 1
to py4web
Good question.

It was intentional to not a MENU helper in py4web because I thought is was easier for users to bring in third party layouts in HTML and edit the menu in HTML. The MENU logic in web2py worked well with the default template but required a lot of customization for third party ones.

Dave S

unread,
Sep 1, 2025, 1:14:42 PM (7 days ago) Sep 1
to py4web
On Monday, September 1, 2025 at 9:10:59 AM UTC-7 Massimo DiPierro wrote:
Good question.

It was intentional to not a MENU helper in py4web because I thought is was easier for users to bring in third party layouts in HTML and edit the menu in HTML. The MENU logic in web2py worked well with the default template but required a lot of customization for third party ones.



Do you have a suggestion for good package to use with Py4Web's defaults?

I think I'm okay with this break from Web2py's "everything is in the box" concept, but then we should also have a good [separate] tutorial in place, and a sample project.  The py4Web docs could something like "For a menu system, package XXXX is one starting place, and examples are ...."
Of course, it would also be nice to have an example for one of the template systems popular with those not using the default scheme.

/dps

Lucas

unread,
Sep 1, 2025, 8:46:16 PM (6 days ago) Sep 1
to py4web
I've decided and have been for the past few days, just writing my own menu system directly in layout.html passing groups information for the logged in user through request.environ, which I hope is a decent idea so I don't have to attach every return dict().
Reply all
Reply to author
Forward
0 new messages