[PLUGIN] Pages with dropdown
Hi there!
Here is my first contribution to this wonderful project. It's basically a copy of the Pages plugin, but when a page has child items, the parent page shows a dropdown arrow that allows you to collapse and extend when clicked, showing it's child pages.
Options:
- Page name
- Show Home link
- Collapsed by default
Download:
Pages Dropdown - v0.2
Installation:
Simply extract the attached zip (pages_dropdown.zip) file to the plugins directory and enable it in the admin panel (I suggest disabling the default pages plugin).
Other notes:
When using this plugin, clicking the parent page will only expand/collapse the menu instead of loading the parent page (unless it doesn't have any child items). This behavior can be changed by rolling back the original href tag in php file.
Version History:
v0.2 (07/11/2015)
- Improvements on installation. Just extract and enable, no need to manually edit theme files. Thanks Fred for the tips.
v0.1 (06/11/2015)
- Initial release
Greetings from your brazilian neighbor, diego
Keep up the excellent work you are doing.
Here is my first contribution to this wonderful project. It's basically a copy of the Pages plugin, but when a page has child items, the parent page shows a dropdown arrow that allows you to collapse and extend when clicked, showing it's child pages.
Options:
- Page name
- Show Home link
- Collapsed by default
Download:
Pages Dropdown - v0.2
Installation:
Simply extract the attached zip (pages_dropdown.zip) file to the plugins directory and enable it in the admin panel (I suggest disabling the default pages plugin).
Other notes:
When using this plugin, clicking the parent page will only expand/collapse the menu instead of loading the parent page (unless it doesn't have any child items). This behavior can be changed by rolling back the original href tag in php file.
Version History:
v0.2 (07/11/2015)
- Improvements on installation. Just extract and enable, no need to manually edit theme files. Thanks Fred for the tips.
v0.1 (06/11/2015)
- Initial release
Greetings from your brazilian neighbor, diego
Keep up the excellent work you are doing.
- Attachments
-
- pages_dropdown.zip
- Pages Dropdown Plugin - v0.2
- (2.18 KiB) Downloaded 245 times
Last edited by Fergo on Sat Nov 07, 2015 5:09 pm, edited 2 times in total.
Hi Fergo,
Thx for your contribution.
Just suggest to use the call hook Theme::plugins('siteHead') for insert the js file in theme
Good idea for this plugin!
Thx for your contribution.
Just suggest to use the call hook Theme::plugins('siteHead') for insert the js file in theme
Good idea for this plugin!
╰☆╮Bludit╰☆╮ is a open source and community contributions are essential to project success!
You are looking for a light forum based Json? Try my project Flatboard, it is free.
Sorry for my little english, i'm french
You are looking for a light forum based Json? Try my project Flatboard, it is free.
Sorry for my little english, i'm french
Thanks Fred.Fred wrote:Hi Fergo,
Thx for your contribution.
Just suggest to use the call hook Theme::plugins('siteHead') for insert the js file in theme
Good idea for this plugin!
Can you elaborate more on that hook? Where do I insert it and how it works?
No problem, in this exemple i prefer use siteBodyEnd hook for load js in bottom page, use siteHead for css.
Add your menu.js in your plugin path.
Add this function in your plugin.php:
Save and finish.
It must notify the user to disable that plugin page, to avoid having a duplicate.
Add your menu.js in your plugin path.
Add this function in your plugin.php:
Code: Select all
public function siteBodyEnd()
{
// Path plugin.
$pluginPath = $this->htmlPath();
return '<script src="'.$pluginPath.'menu.js"></script>';
}
It must notify the user to disable that plugin page, to avoid having a duplicate.
╰☆╮Bludit╰☆╮ is a open source and community contributions are essential to project success!
You are looking for a light forum based Json? Try my project Flatboard, it is free.
Sorry for my little english, i'm french
You are looking for a light forum based Json? Try my project Flatboard, it is free.
Sorry for my little english, i'm french
Hi Fergo, it's a nice feature, if you want you can push your plugin on github, https://github.com/dignajar/bludit-plugins
There are the plugins for Bludit.
Diego
There are the plugins for Bludit.
Diego
Sorry, I not used to version control systems. To create a pull request do I need to clone the entire repository so you can merge into the master branch?diego wrote:Hi Fergo, it's a nice feature, if you want you can push your plugin on github, https://github.com/dignajar/bludit-plugins
There are the plugins for Bludit.
Diego
Ok no problem. Here is a link with a little tutorial https://help.github.com/articles/using-pull-requests/
- Edi
- Site Admin
- Posts: 3121
- Joined: Sun Aug 09, 2015 5:01 pm
- Location: Zurich
- Has thanked: 54 times
- Been thanked: 77 times
- Contact:
It's a nice plugin. The only problem: It does not show the content of the parent page, only the content of the child pages.
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets