![]() |
|
issue with printCustomMenu()? - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: issue with printCustomMenu()? (/thread-13407.html) |
issue with printCustomMenu()? - vincent3569 - 2020-05-12 hi it seems I have an issue with printCustomMenu() function. 1- in lastest documentation (https://docs.zenphoto.org/1.5.3/function-printCustomMenu.html), I can see that $option can be set to 'list-top'.
example of code with garland when I am on top level of news menu, I have this code:
but If I choose a news item, I have this code:
you can see the two levels displayed, and also "active" class disapeared. issue with printCustomMenu()? - acrylian - 2020-05-12 Without trying myself lacking the time right now: I think what you see is an "invented" sub item. If you are on a news article the "news" link would not stay active because the article is not a sub item in the menu. This the menu "invents" an sub item therefore. The same happens on image pages regarding the album. The custom menu is generally outside of any context and does not know about it as you can mix everything against the actual content structure (e.g. making albums sub menu entries of albums that are not their parent even if that is confusing) .This "invention" is the only exception as there is no menu item for single images or single articles. You have to hide that via CSS currently. I am not sure why this would make a difference if loggedin or not right now. Perhaps that is an unpublished article? I don't remember why it was done this way anymore. There might be a better way and it is on the long list of things to do… issue with printCustomMenu()? - acrylian - 2020-05-12 I can confirm that this is the "Invented" item I mentioned above. You need to add theme CSS to hide this sublist by the class name attached, e.g. issue with printCustomMenu()? - vincent3569 - 2020-05-12 very hard to understand the behavior of this plugin and how works printCustomMenu(). issue with printCustomMenu()? - acrylian - 2020-05-12 Yes, generally I agree that this would make sense. As said the plugin is on the list to be reworked in the future anyway. issue with printCustomMenu()? - vincent3569 - 2020-05-12 I have to code a workaround in my theme to manage this plugin and I really don't like it. |