Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Current Parent
#15
(2014-02-14, 03:17:22)xxdex Wrote: it's working only for a two level menu..
how to integrate it for a multilevel menu.. no only two levels ?

active menu in the seccond level is activating a top menu as active (awesome)
but when i click and go to the page in the third level of menu.. this will only give me a active the button in the seccond level menu and third menu level.. the top level menu (1) is not active. how to fix it ?

Hi and sorry for the delay :-)

Well for that purpose one would probably have to parse $menudata and generate the whole navigation menu, because I don't know if it is somehow possible to call get_parent for a page other than the active one. Right now I am just altering the generated HTML via the menuitems filter. I have chosen this approach, because I wanted the plugin to work with the default get_navigation function for those people who do not want to tinker with any code and don't feel like replacing something in their template.php file.

If you find a solution to implement this without having to write an own get_navigation function I would really appreciate your contribution! Otherwise I guess i18n really is better suited for more complex tasks like this.
Reply


Messages In This Thread
Current Parent - by mank319 - 2014-02-07, 21:00:43
RE: Current Parent - by Timbow - 2014-02-08, 00:40:09
RE: Current Parent - by mank319 - 2014-02-08, 00:42:50
RE: Current Parent - by shawn_a - 2014-02-08, 00:55:59
RE: Current Parent - by mank319 - 2014-02-08, 01:50:42
RE: Current Parent - by Carlos - 2014-02-08, 01:20:07
RE: Current Parent - by shawn_a - 2014-02-08, 01:37:57
RE: Current Parent - by shawn_a - 2014-02-08, 02:42:21
RE: Current Parent - by mank319 - 2014-02-08, 02:48:45
RE: Current Parent - by Carlos - 2014-02-08, 03:59:49
RE: Current Parent - by mank319 - 2014-02-08, 03:16:29
RE: Current Parent - by shawn_a - 2014-02-08, 04:26:37
RE: Current Parent - by xxdex - 2014-02-14, 03:17:22
RE: Current Parent - by mvlcek - 2014-02-14, 04:54:28
RE: Current Parent - by mank319 - 2014-02-16, 20:45:19



Users browsing this thread: 1 Guest(s)