Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom Menu (Version 0.6)
At the time of publishing, there hasn't being a plugin that lets you build menus independently of pages (i.e. entries have to be added into the template file manually). This plugin seeks to try and solve that issue.

Download (latest)


  • Build nested/hierarchical structures (as you could with the built-in GetSimple navigation)
  • Add any URLs to the list, external or internal, regardless of whether the page exists (e.g. dummy pages, dynamically generated pages, etc...)
  • Create any number of menus desired, for any required purpose
  • Dead-simple to make an item open its link externally
  • Has placeholder (% custom_menu 'menuname' %) to allow function to be called in page content also
  • Menus are generated entirely independent of existing built-in menu navigation - they will not affect that original menu
  • Images can be used instead of text (v0.5+)
  • Available in English, Italian, Russian and German (Google Translations)

[Image: 28de9664-0aa5-11e3-9fa8-07a24670d501.png]
[Image: 28e41314-0aa5-11e3-89e8-d477777e1ac8.png]
[Image: 28e06912-0aa5-11e3-9853-e66900b8e346.png]

transliteration of the link does not work
Changelog (v0.2)
- Transliteration added (for page title, slug and url).
why Tittle transliteration? Smile
I thought that normal page titles had that done as well (from looking in the admin/changedata.php code). Should that be removed for titles?
Is menu should not be in Russian?
Changelog (v0.3)
- Transliteration no longer affects menu titles/labels
- HTML base tag added to fix relative urls (now all are relative to site url)
I'm having problem enabling Custom Menu:

Warning: Invalid argument supplied for foreach() in /home/xtz/domains/ on line 243

GS 3.2.2, debug mode not showing anything.
Does the file data/other/custom_menu/default.xml exist? (It should be created automatically when you access the Customize Menus page). I don't get the error - even if I delete the custom_menu folder and reload the page.


Changelog (v0.31)
- Attempt to fix error ohayo picked up
I've checked and there was no visible default.xml, but when I was trying to copy newly created I was ask if I wanted to overwrite old default.xml.

Also I couldn't delete folder "custom_menu" so I've check the folder permissions - it was 357 (not sure, definitely 3xx). Setting permissions manually to 755 solved the problem and now I can create new entries.

OK, checked other server - same situation. Default permission is 341, changing to 755 resolves the problem Smile
That's good to hear :-)

So are you affirming that this is a problem on your server (with directory/file write permissions)? Or is this the only plugin that you've used that has failed to create directories with the correct permissions?
and I also doing well Smile cool plugin, very useful
This is the only plugin that failed (I'm using about 10 plugins). I've tested 2 separate servers and problem was still there, don't know why.

Is it possible to mix Custom Menu plugin with Bootstrap dropdown menus (now it's based on I18N menu)? It would be useful for people using #anchors in links as in GS you cannot save link with "#".

Check -
I'm using it here -

<div class="nav-collapse">
   <ul class="nav">
   <?php get_i18n_navigation(get_page_slug(FALSE),0,1,I18N_SHOW_MENU, 'nav'); ?>

+ component 'nav'

PHP Code:
$caret $dropdown $dropdown_list '';

$classStr $item->classes;
$classes explode(' ',$item->classes);
in_array('current',$classes)) $classStr .= ' active';
in_array('currentpath',$classes)) $classStr .= ' active';

$item->hasChildren and ($item->isOpen or $ismenu==true)){
in_array('open',$classes)) $classStr .= ' dropdown';
$dropdown 'data-toggle="dropdown" class="dropdown-toggle"';
$dropdown_list ' class="dropdown-menu"';
$caret '<b class="caret"></b>';
$classStr str_replace('open','',$classStr);

<li class="<?php echo $classStr?>">
  <a href="<?php echo htmlspecialchars($item->link) . "\""; echo ' '.$dropdown?> >
# debugLog(htmlspecialchars($item->text));           
echo htmlspecialchars($item->text); echo $caret
  <?php if ($item->isOpen) { ?>
    <ul<?php echo $dropdown_list.'>'$item->outputChildren(); ?></ul>
  <?php ?>
can come up with a class currentpath? Smile
and mysite/ssylka1/ssylka2/ssylka3/
Changelog (v0.4)
- Classes for current path, current item, parents (equivalent of hasChildren) and children (terminating items) added
- Main PHP Function now has $classes parameter for you to set your own names for the classes above:
PHP Code:
<?php get_custom_menu($menu$classes=array('currentpath' => 'newcurrentpath', ...));  ?>
-- The array's keys correspond to the class names. The values correspond to the new values that they will take.
-- Available keys: currentpath, current, parent, child
I had permission problem too, but after change folder perms > 755 everything work like charm Wink Great job again ! Many ThX AB Wink
is it possible to make so that when you create a new page is added menu item? but to leave the ability to add individual menu items.
It's very unlikely. The menus created are designed to exist independently of all other data structures. I can't think of a way to work that feature in successfully. Sad
yes, I forgot, the plugin is very useful and cool Smile
I tried instal of v0.4 in both gs3.1.2 and gs3.2.3. I had permissions prob in both with custom_menu data directory being created with perms of 1321. I changed it to 0755 and now works ok in gs3.2.3 but in gs3.1.2 it only part works, with the '+ Item' button not working, so can't add a second menu item :-(

Guess I'll stick with the latest stable GS :-)
Hey, very nice plugin!

What you could ad:
  • drop down menu for slug-selection
  • add image instead or with link

Some websites use images as links in a menu.
Just discovered this... now I'm really angry at myself for using this other CMS (which by now I grown to hate) for a project of mine...

@datiswous: Important navigation menus don't consist of images because such menus aren't SEO friendly.
(2013-09-09, 19:19:59)Everyone Wrote: @datiswous: Important navigation menus don't consist of images because such menus aren't CEO friendly.

I thought there are ways to make them still seo friendly.
Changelog (v0.5)
- Deleted unnecessary create.php file (if you still have this file, you can safely delete it)
- Dropdown menu with list of page slugs added for convenience (@datiswous)
- 'Image' field added - when URL is supplied, image is shown instead of text (@datiswous)
-- Also, if you do not provide a domain prefix (http://...), the image url is made relative to the data/uploads/ folder
- If no URL is provided, no anchors are output around the text/image are output
- Image and anchors have 'title/alt' attributes for better SEO (@Everyone)
- Ensures no two entries can have the same slug (before, this problem could cause infinite recursive loop(s) when displaying the menu)
Thank You AB !

Users browsing this thread: 1 Guest(s)