-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement main menu #29
Conversation
@abitrolly let's discuss this feature in person |
Items are not translated. |
<a href="/">Home</a> | ||
</li> | ||
{% for page, is_active in menupages %} | ||
<li>{% if is_active %}<strong>{% endif %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why would you like to use <strong>
instead of class="active"
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because there is no style for "active" nav item (#32) so there is no visual feedback for currently selected menu item.
PTAL. |
I'm working on updating page tree structure these days. I'll update the way we fetch menu items as a part of this. Another thing I'd like to improve is to have one translated title field.
I'll create issues for the 2 items above. @abitrolly could you please squash this on merging? |
LGTM |
@nott squashed and merged. |
LGTM is still pending approval. What's going on with that bot? |
i've switched the bot off several days ago. |
Extract top navigation menu structure from wagtail Page tree. Extract link for root page from HomePage object. Detect current page in main menu and set style as `active`. Render only children that have "Show in menu" flag set. Show translated menu items by using `caption` if available.
Main menu is a top navigation breadcrumb. It is just a list of pages that are immediate childs of Home page with set flag
Promote -> Show in menus
.