inveniosoftware / flask-menu

Flask-Menu is a Flask extension that adds support for generating menus.
https://flask-menu.readthedocs.io
Other
53 stars 45 forks source link

Clarify menu's root purpose #71

Open slavkoja opened 5 years ago

slavkoja commented 5 years ago

Please, can you describe purpose and usage of the menu's root (its path is dot)?

In basic example is root's menu item (index) defined by this:

@register_menu(app, '.', 'Home')

But this "Home" item is not returned by the children list, only other two items (from this example) are shown. (Python 3.7, win64, latest flask and flask-menu)

I looked in the code, but i was not able to find someting usefull, what i can use to get link to home created as in example. Of course, when i add some path to it, i can get it as other items. Please, is it possible to work with this root?

slavkoja commented 5 years ago

OK, i got it by using text and url of current_menu. But, please add it into example for future...