Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Current Parent
#7
(2014-02-08, 00:55:59)shawn_a Wrote: I imagine this is useless without a multi level plugin ?
I mean what would it provide for a parent in a a flat 1 d menu ?
Yes, as I explained I use it with Child Menu. May be of use with the Nested Menu plugin aswell, I guess.

(2014-02-08, 01:20:07)Carlos Wrote: I use this in my templates to highlight the current page or parent in the (1-level) menu.
PHP Code:
<?php get_navigation(get_parent(false)==''?return_page_slug():get_parent(false)); ?>
Thanks for the hint! That's similar to the way I wanted to accomplish it beforehand.
But I prefered to incorporate the functionality into a modular plugin, that is independend of the theme used, so it can be reused and easily installed by folks, who do not want to tinker with code at all.

@shawn_a: is there any way to call the get_navigation function without echoing? This way one could benefit from the cleaner looking code of Carlos' example, but still retain the advantages of a modular solution, like mine.
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)