ShortCode Menu

The way how to use shortcodes with Menu Manager
on Wednesday 28 August 2019
comments: 0


This menu adds possibility to use shortcodes directly in Menu manager.

No configuration is needed.

Reasons for this:

1. power of e107 menu manager  (visibility, configuration, templating).

2. you can use custom menus, but with Tinymce plugin there could be parse issues. With custom menu you create page too, so easier way is better.

3. you can use theme shortcodes, but you can't have them as menu 

4. there are menus with parameters, but they are missing configuration in Menu manager.

Shortly, this saves theme development time. 


for now you need to click on configuration button to see menu parameters (I have feature request for this )

- you need to know how shortcodes look and how to set them.  For this I am creating list of available shortcodes on my site


Chapter menu (page/chapter_menu.php).  You can add it Menu manager (It's listed there). No parameters. 

You can insert it to theme.php this way:

{MENU: path=page/chapter_menu} to have the same result as in Menu manager.

You can use {MENU: path=page/chapter_menu&book=2} to display just chapters of book 2, but only hardcoded.


you can add shortcode menu in Menu manager, click on configuration and insert shortcode there. This way each your menu can have a different caption (you can set there too) or can be without caption. 

Third parameter is 'id' for table_render() function.

Author note.  This menu was used mainly for elements shortcodes. The new version of JM Elements plugin has its own menu for any element, but you can still use it this way. 





Other links

Follow us