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

faking menu items doesn't work #41

Open
jhnc opened this issue Apr 10, 2014 · 2 comments
Open

faking menu items doesn't work #41

jhnc opened this issue Apr 10, 2014 · 2 comments

Comments

@jhnc
Copy link

jhnc commented Apr 10, 2014

If I add everything into the menu system, navigation works fine. However page loading becomes unacceptably slow.

The main way I have found to avoid adding everything into the menu system appears to be to call menu_set_active_item() or menu_tree_set_path(). Unfortunately neither of these works with the theme.

menu_tree_set_path() appears to add entities to the correct part of the menu tree
but the vertical navigation is not expanded and breadcrumbs are broken.

menu_set_active_item() expands the navigation (mostly) correctly, but breadcrumbs lose the final crumb (eg. page d; desired trail = a->b->c->d ; calling menu_set_active_item(c) gives trail = a->b->d) causing operations such as editing to potentially operate on the wrong item.

I failed to attach three images that I hope illustrate the problem, so they are available at:

http://www.newton.ac.uk/tmp/jc254/pjl/1__menu_tree_set_path.png
http://www.newton.ac.uk/tmp/jc254/pjl/2__menu_set_active_item.png
http://www.newton.ac.uk/tmp/jc254/pjl/3__desired.png

@mrginglymus
Copy link

For those returning to this issue, the module Menu Position might provide a quick solution.

@jhnc
Copy link
Author

jhnc commented Aug 10, 2015

Yes, I would hope it to be possible to use menu_position for this but as a novice I couldn't work out how.

My recollection of my attempt to use it is that it would only have been helpful in my case when adding leaves to the menu because I couldn't work out how to nest placeholders without breaking breadcrumbs, active trail, or other parts of the projectlight navigation:

  • node1
    • [menuposition1]
      • node2
        • [menuposition2]
          • node3
            • [menuposition3]
              • node4
              • [...]
          • [...]
      • [...]

(In my case, mp1/2/3 might correspond to lists of programmes/workshops/seminars.)

Also, I think I couldn't work out how to dynamically add them into menus.

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