Welcome | Get started | Dive into Lino | Contribute | Topics | Reference | More

The application menu

As we have seen, a Lino application contains models, tables, layouts and actions. But one important piece is missing: the application menu.

application menu

The application menu or main menu specifies how the different functionalities of an application are structured when presenting them to the user.

Every application has one --and only one-- application menu. But each user will see only the parts to which they have access permission.

A simple application menu

For simple applications you can define the complete menu by overriding the lino.core.site.Site.setup_menu() method of your application.

An example for this approach is in The mysite/settings.py file. Let's have a look at this application.

>>> from lino import startup
>>> startup('lino_book.projects.polls.mysite.settings')
>>> from lino.api.doctest import *

You have seen the application menu in a browser window. But you can also show it in a documentation page:

>>> show_menu('robin')
- Site : About
- Polls : Questions, Choices

See also How plugins build the application menu.