Posts: 22
Threads: 2
Joined: May 2010
Hi.
I have made a simple little child menu plugin that I thought I may share.
The goal of it is to make it fast and simple to get child pages to appear on parent/sibling pages.
Maybe it will come in handy for some of you.
You can get it on http://www.fohlin.net/tech-stuff/getsimp...enu-plugin
Cheers
Posts: 3,491
Threads: 106
Joined: Mar 2010
Your instructions:
Quote:You will need to call the event:
<?php exec_action('print_child_menu'); ?>
in the template.php document wherever you want to print the menu.
Wouldn't it be easier to call the function directly, instead of calling an event that calls the function? Like this:
Code: <?php go_child_menu(); ?>
Posts: 1,921
Threads: 87
Joined: Apr 2010
2010-08-12, 01:35:05
(This post was last modified: 2010-08-12, 02:37:47 by jhondavis.)
very useful plugin
very simple
Posts: 22
Threads: 2
Joined: May 2010
Carlos Wrote:Wouldn't it be easier to call the function directly, instead of calling an event that calls the function? Like this:
Code: <?php go_child_menu(); ?>
Hm... yes you are right.
I had it on the hook content-top first, but did not like it, so I just made the event instead.
It would probably be simpler and cleaner to call the function directly.
I will update the plugin and docs.
Thanks,
Erik
Posts: 6
Threads: 1
Joined: Aug 2010
2010-08-17, 13:10:02
(This post was last modified: 2010-08-17, 13:21:22 by song mp3.)
I'm getting a bug . I installed the plugin, replaced
Code: <?php get_navigation(return_page_slug()); ?>
with
Code: <?php go_child_menu(); ?>
and I get an empty <ul></ul> when I have a look with firebug. Nothing is showin' up, either. I don't have fancy urls on and am testing it in localhost (with the default setting using xampp). I installed it with easy-install, so I don't know if that makes a difference.
Sorry to be such a downer
EDIT: By the way, nice site. I found the text "Start sidebar" though and wondered if it was meant to be there...
Anyway, I'd also like to point out you have the default favicon in your theme .
Lol, just had another look and found a starting comment in the top right-hand corner of your theme . (<!--).
Good luck!
Posts: 22
Threads: 2
Joined: May 2010
Hi.
Well, you should not replace Code: <?php get_navigation(return_page_slug()); ?>
It still needs to be there for the main menu.
Instead you should just add Code: <?php go_child_menu(); ?>
wherever you want the children/siblings menu to appear.
Thanks for pointing out the typos in the theme ;-) have not checked it that well myself.
Stew_822 Wrote:I'm getting a bug . I installed the plugin, replaced
Code: <?php get_navigation(return_page_slug()); ?>
with
Code: <?php go_child_menu(); ?>
and I get an empty <ul></ul> when I have a look with firebug. Nothing is showin' up, either. I don't have fancy urls on and am testing it in localhost (with the default setting using xampp). I installed it with easy-install, so I don't know if that makes a difference.
Sorry to be such a downer
EDIT: By the way, nice site. I found the text "Start sidebar" though and wondered if it was meant to be there...
Anyway, I'd also like to point out you have the default favicon in your theme .
Lol, just had another look and found a starting comment in the top right-hand corner of your theme . (<!--).
Good luck!
Posts: 6
Threads: 1
Joined: Aug 2010
2010-08-19, 07:15:14
(This post was last modified: 2010-08-19, 07:29:56 by song mp3.)
I can't believe it's that simple and I missed it. Thanks erka! I'll test it out!
EDIT: Works fine . Thanks!
Posts: 65
Threads: 7
Joined: Apr 2010
Posts: 22
Threads: 2
Joined: May 2010
Child Menu v. 1.1 is available on http://www.fohlin.net/getsimple-child-menu-plugin
It has been cleaned up a bit with proper, GS recommended, file paths and storage of the cache files in the proper , GS recommended, location.
Enjoy.
Posts: 2
Threads: 0
Joined: Nov 2010
How can i get this to sort the sub-menu (ex A-Z)? It seems to just appear in a random order Otherwise great plugin
Posts: 22
Threads: 2
Joined: May 2010
Hi, I thought the sub-menu is sorted A-Z automatically, at least that is what happens on the servers I have. Maybe there is a difference in how your server reads the files. Do you have an example page where the sorting is random? I think this is not too hard to fix but I can not reproduce the issue.
kjemperud Wrote:How can i get this to sort the sub-menu (ex A-Z)? It seems to just appear in a random order Otherwise great plugin
Posts: 1,921
Threads: 87
Joined: Apr 2010
need to assign a class of active link
Posts: 22
Threads: 2
Joined: May 2010
Yes that would be good, but sadly with the current implementation it is not quite possible since there is only one sub-menu file per parent page. To get this the plugin would have to be re-designed a bit so that each child page also had its own sub menu file or something like that. Oleg06 Wrote:need to assign a class of active link
Posts: 22
Threads: 2
Joined: May 2010
Hi.
Try the new version 1.4, it should sort the sub-menu A-Z in case it is not sorted automatically.
Remember to re-save some page after you upgrade the plugin to clear the cache.
kjemperud Wrote:How can i get this to sort the sub-menu (ex A-Z)? It seems to just appear in a random order Otherwise great plugin
Posts: 50
Threads: 10
Joined: Nov 2010
erka, it displays a parent link in my sidebar. How to get rid of it?
Services ( parent - domain.com/services/ )
Company formation ( child - domain.com/services/company_formation/ )
I need only:
Company formation ( child - domain.com/services/company_formation/ )
Services should remain only in the main menu block. Now I have 2 Services links - one in the main menu and 2nd in the sidebar.
Posts: 1,921
Threads: 87
Joined: Apr 2010
delete in line 95 <p id="parent"><a href="'.$XMLdata->url.'">'.$XMLdata->title.'</a></p>
delete in line 99 <p id="parent"><a href="index.php?id='.$XMLdata->url.'">'.$XMLdata->title.'</a></p>
Posts: 50
Threads: 10
Joined: Nov 2010
Oleg06 Wrote:delete in line 95 <p id="parent"><a href="'.$XMLdata->url.'">'.$XMLdata->title.'</a></p>
delete in line 99 <p id="parent"><a href="index.php?id='.$XMLdata->url.'">'.$XMLdata->title.'</a></p>
Yes, everything is OK.
But there are no any links at all in the sidebar if I go to the Home page. The sidebar is blank
Posts: 1,921
Threads: 87
Joined: Apr 2010
this plugin works well, shows only link to parent page and child pages, if you want to display this menu in the sidebar on all pages you must use the components and write the menu manually
Posts: 50
Threads: 10
Joined: Nov 2010
Posts: 1,921
Threads: 87
Joined: Apr 2010
Posts: 50
Threads: 10
Joined: Nov 2010
It makes clones in the sidebar.
Main menu
Home
Services
Sidebar menu
ÃÂþme
Services
I need:
Main menu
Home
Services
Sidebar menu
Company Formation
Offshore Registration
...................
...............
all these links are childs of parent one - Services
Posts: 1,921
Threads: 87
Joined: Apr 2010
here I've used this plugin, but when you add pages to be rewritten reference numbers
http://sex-after-18.com/adult-games
download
http://neowebtime.ru/gbp_menu.zip
Posts: 50
Threads: 10
Joined: Nov 2010
Yes, I can see your site - this is what I need.
But it does not work for me and I do not understand what is wrong.
I just get clones of the main menu in the sidebar.
Posts: 1,921
Threads: 87
Joined: Apr 2010
2010-11-24, 22:30:58
(This post was last modified: 2010-11-24, 22:31:51 by jhondavis.)
Assign page numbers and try to write them in code
<ul><?php gbp_menu(return_page_slug(),1,3); ?></ul>
or
<ul><?php gbp_menu(return_page_slug(),10,34); ?></ul>
Posts: 50
Threads: 10
Joined: Nov 2010
Sorry, I do not understand - what numbers, where are these numbers, where I can get these numbers, numbers of what?!
1. Þûõó, ø÷òøýø, ýõ ÿþýøüðю - úðúøõ тðúøõ ýþüõрð, óôõ øх ñõрут ø úðú Ѡüþóу øх ÑÂþ÷ôðть.
2. ÃÂõ ÿþôÑÂúðöõшь ÿþ ýþòþÑÂтÑÂü. ÃÂõ ÿþûучðõтÑÂÑÂ. ßþô ýþòþÑÂтью òÑÂõóôð ýðхþôøтÑÂѠñûþú ÑÂòþôúø ôруóøх ýþòþÑÂтõù, ð üýõ ýуöýþ úðú у тõñÑÂ: http://neowebtime.ru/0/index.php?id=news...1%82%D0%B8
I do not understand why it looks like this. When I click the news title then I get a news text and excerpts of the rest news:
Quote:News Title #1
Nov, 20
Example blog contents description here. Example blog contents description here. Example blog contents description here. Example blog contents description here. Example blog contents description here.
News Title #2
Excerpt, excerpt, excerpt, excerpt, excerpt, excerpt, excerpt, excerpt, excerpt.
News Title #3
Excerpt, excerpt, excerpt, excerpt, excerpt, excerpt, excerpt, excerpt, excerpt.
News Title #4
Excerpt, excerpt, excerpt, excerpt, excerpt, excerpt, excerpt, excerpt, excerpt.
But it should be like this (only one news block per page):
Quote:News Title #1
Nov, 20
Example blog contents description here. Example blog contents description here. Example blog contents description here. Example blog contents description here. Example blog contents description here.
|