Skip to content
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

Main menu links are expanded even when their children are not accessible by current user. #59

Open
darkodevubc opened this issue Sep 16, 2021 · 2 comments
Assignees

Comments

@darkodevubc
Copy link
Contributor

Steps to reproduce

  1. Create a parent node and menu item
  2. Create a child node and menu item
  3. Unpubilsh the child node

Symptom
Visit the site as anon
Parent menu gets the dropdown button when it shouldn't, since the child is not accessible

Fix
Before rendering the dropdown button in menu--main.html.twig, check for children with item.below:

{% if item.below %} <button class="btn dropdown-toggle" data-toggle="dropdown"><span class="ubc7-arrow blue down-arrow"></span> </button> {% endif %}

@darkodevubc
Copy link
Contributor Author

darkodevubc commented Sep 16, 2021

I won't create a PR for this unless it's deemed worthy at the Galactus level. Until then, I've implemented this in our custom CLF theme by copying Galactus menu--main.html.twig and making the change.

@darkodevubc darkodevubc changed the title Main menu links are expanded even when their children and not accessible by current user. Main menu links are expanded even when their children are not accessible by current user. Sep 16, 2021
@occupant
Copy link
Member

Oh, nice catch. I'll get that one in there for sure.

darkodevubc added a commit to darkodevubc/galactus that referenced this issue Aug 31, 2023
…en their children are not accessible by current user.
joelpittet added a commit that referenced this issue Oct 23, 2023
Fixes issue #59: Main menu links are expanded even when their childre…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants