Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
New PlugIn Menu Parent_Child
#1
Hello.
I leave a plugin that allows to put the parent page and 'his pages childrens', of the current page.
For use, to put in template:
Code:
<?php menu_pchild(); ?>

PD: it is my first programming in php... please test if there is something wrong...

Regards.

PD2: the version 3 in http://get-simple.info/forum/viewtopic.p...4404#p4404

PD3: the version 4 in http://get-simple.info/forum/viewtopic.p...5136#p5136

PD4: the version 4.1 in http://get-simple.info/forum/viewtopic.p...5146#p5146
Reply
#2
Hello.
Upload the version 2.

I have improved the order to show the page childrens.
The order taking is that there in the Page Management > Page Options > Add to menu >> Priority; and the name that show is the Menu Text of Add to menu.
Then you should enabled 'Add to menu' and put a priority and a menu text and save it. After, if you don't want that show in the menu of GetSimple uncheck 'Add to menu', but yes will be show in my menu.

PD: sorry for my bad english.
Reply
#3
Do you have a working example site?

Thanks.

homershines
Reply
#4
A working example site:
http://cumbe.no-ip.biz/GS_201_RC3/index.php?id=page1

Regards.
Reply
#5
homershines Wrote:Do you have a working example site?

Thanks.

homershines


Homer, this plugin works very slick, I've used it to output anything page related. Title, url, content. Pair it with Noodles Customfields plugin and you can output the customfields attributed to the pages being listed. I'll post some examples when I'm done.
Reply
#6
cameron Wrote:
homershines Wrote:Do you have a working example site?

Thanks.

homershines


Homer, this plugin works very slick, I've used it to output anything page related. Title, url, content. Pair it with Noodles Customfields plugin and you can output the customfields attributed to the pages being listed. I'll post some examples when I'm done.

Sounds good.
Can't wait to see.

Thanks.

homershines
Reply
#7
Brilliant, thank you! I will show you what I've done when I'm finished the site and I'm interested to see what others do.
Reply
#8
Just a quick question, is there a way to show the menu text for the parent instead of the url? I have looked at the plugin file and tried a few things but I don't really know what I'm doing!
Reply
#9
Hello,
Upload the version 3.

I have improved the order to show the page childrens.
The order taking is that there in the Page Management > Page Options > Add to menu >> Priority; and the name that show is the Menu Text of Add to menu.
Then you should enabled 'Add to menu' and put a priority and a menu text and save it. After, if you don't want that show in the menu of GetSimple uncheck 'Add to menu', but yes will be show in my menu.

In this version, show the menu text of parent, instead of url:
Quote:banter in post 8:
Just a quick question, is there a way to show the menu text for the parent instead of the url? I have looked at the plugin file and tried a few things but I don't really know what I'm doing!

PD: sorry for my bad english.

Regards.
Reply
#10
Thanks
Reply
#11
I've been using this to good effect on lower-level pages, but now I need to use it on a top-level page and the links don't seem to have the appropriate subdirectory. Normally they are on pages like this:

example.com/services/design

But when I use the plugin on a top level page, the links go to this instead:

example.com/design

Is there a way to fix this by changing something in the plugin? I've already changed it to put the links in columns based on how many links there are.
Reply
#12
It looks like all I'd really need to do is to replace where it's pulling the page slug with a request for the page URL. I can see where it's populating the array for the actual menu HREFs, but I can't figure out what it's actually doing. Any suggestions?
Reply
#13
Hello StateStreet,
Do you have ' Use Fancy URLs ' enabled?.
How are you 'url'?

I do not understand well the problem (my english isn´t good).

Regards.
Reply
#14
Hi, Cumbe!

Yes, I have 'Use fancy URLS' enabled. It's actually working fine with that setting; it just seems that it doesn't work with multi-level fancy URLs, such as "category/page" instead of "/page".

I really like your plugin, though!
Reply
#15
Hello,
Upload the version 4.

With this version the plugin works with 'Use fancy URLS' enabled, too.

Working example sites:
- 'Use fancy URLS' enabled: http://cumbe.no-ip.biz/GS/

- 'Use fancy URLS' disabled: http://cumbe.no-ip.biz/GS_201_RC3/index.php?id=index

I've programmed the best I know, surely there are better ways, but... If someone wants to improve, he is free to do.

Regards.

PD: if there is a bug, please comment.
Reply
#16
Hello,
Upload the version 4.1

With this version the plugin works with 'Use fancy URLS' enabled, too.

Working example sites:
- 'Use fancy URLS' enabled: http://cumbe.no-ip.biz/GS/

- 'Use fancy URLS' disabled: http://cumbe.no-ip.biz/GS_201_RC3/index.php?id=index

I have done a improve small, replacing the part that reads the xml files of website and cp_settings by two global declarations at first of script. Of this way, is some more fast the plugin.

Regards.

PD: if there is a bug, please comment.
Reply
#17
Hello, i'm new to GetSimple and evaluating it now.
First of all, i'd like to thank to all of those devs and idea makers.
To: Cumbe
many thanks! This feature is very important to me, and to the others as i gues Smile
I'm going to prove it!
Reply
#18
Hello!
Why the parent url form http://site.com/parent/parent ?
I think that he must be http://site.com/parent/

Sorry, for my english Smile
Reply
#19
When I delete page, cache is not clean
Reply




Users browsing this thread: 2 Guest(s)