GetSimple Support Forum
Child menu plugin - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Plugins (http://get-simple.info/forums/forumdisplay.php?fid=13)
+--- Thread: Child menu plugin (/showthread.php?tid=928)

Pages: 1 2 3 4


Child menu plugin - erka - 2010-08-11

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/getsimple-child-menu-plugin
Cheers


Child menu plugin - Carlos - 2010-08-12

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(); ?>



Child menu plugin - Oleg06 - 2010-08-12

very useful plugin
very simple


Child menu plugin - erka - 2010-08-12

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


Child menu plugin - Stew_822 - 2010-08-17

I'm getting a bug Sad. 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 Sad

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 Smile.
Lol, just had another look and found a starting comment in the top right-hand corner of your theme Wink. (<!--).

Good luck!


Child menu plugin - erka - 2010-08-17

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 Sad. 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 Sad

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 Smile.
Lol, just had another look and found a starting comment in the top right-hand corner of your theme Wink. (<!--).

Good luck!



Child menu plugin - Stew_822 - 2010-08-19

I can't believe it's that simple and I missed it. Thanks erka! I'll test it out!
EDIT: Works fine Smile. Thanks!


Child menu plugin - Johonwayni - 2010-08-19

Thanks Erka! Works


Child menu plugin - erka - 2010-08-20

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.


Child menu plugin - kjemperud - 2010-11-06

How can i get this to sort the sub-menu (ex A-Z)? It seems to just appear in a random order Sad Otherwise great plugin Smile


Child menu plugin - erka - 2010-11-18

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 Sad Otherwise great plugin Smile



Child menu plugin - Oleg06 - 2010-11-18

need to assign a class of active link


Child menu plugin - erka - 2010-11-18

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



Child menu plugin - erka - 2010-11-18

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 Sad Otherwise great plugin Smile



Child menu plugin - arthur_a_keen - 2010-11-24

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.

Smile


Child menu plugin - Oleg06 - 2010-11-24

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>


Child menu plugin - arthur_a_keen - 2010-11-24

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 Smile


Child menu plugin - Oleg06 - 2010-11-24

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


Child menu plugin - arthur_a_keen - 2010-11-24

Thank you Oleg!


Child menu plugin - Oleg06 - 2010-11-24

I forgot, there is still such a plugin
http://get-simple.info/forum/topic/770/group-by-priority-menu/


Child menu plugin - arthur_a_keen - 2010-11-24

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


Child menu plugin - Oleg06 - 2010-11-24

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


Child menu plugin - arthur_a_keen - 2010-11-24

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.


Child menu plugin - Oleg06 - 2010-11-24

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>


Child menu plugin - arthur_a_keen - 2010-11-24

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&dblog_newsitemid=3&dblog_newsitem=%D0%9D%D0%BE%D0%B2%D0%BE%D1%81%D1%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.