JMTheme plugin

JMTheme plugin


JMTheme plugin uses {DEFAULT_MENUAREA=999} shortcode. This shortcode displays all menus for default layout defined for defined area:

{MENU=999} or {MENUAREA=999}

 It is used mainly for the footer. So if you see something like this in your


It means that :

  • you still can use the menu added via Menu Manager for your layout by using the standard way
  • but you don't do anything if your menu area is the same as for the default layout.

If you don't want this behavior, just remove this shortcode from your footer layout. You can easily get it back by using the shortcode menu available with this plugin too.

The more layouts your theme has, the more is this shortcode handy.  

ShortCode Menu


This menu adds the possibility to use shortcodes directly in the 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 the Tinymce plugin there could be parse issues. With the custom menu, you will create a page too, so the 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 the configuration button to see menu parameters (I have a feature request for this )

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


Chapter menu (page/chapter_menu.php).  You can add it to 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 the 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 has its own menu for any element, but you can still use it this way. 


JM Theme Shortcodes

- displays menuarea 999  from default layout on all other layouts (not only default) where is this shortcode used
- example:
displays menus from area 100 set in default layout + menus from area 100 set for this layout 

- it's helpfull if more layouts use the same footer with the same content.
  By signing up you agree to <a href="{SITE_TERMS_LINK}">  Terms of Service</a>

- returns e_PRIVACY_URL defined in theme.php
  By signing up you agree to <a href="{SITE_TERMS_LINK}">  Terms of Service</a>

- returns e_TERMS_URL defined in theme.php

returns background image for layout

{LAYOUT_BGIMAGE: mode=full&template=bgimage}
 <div class="image" style="background-image: url({BGIMAGE})"> </div> 

{LAYOUT_BGIMAGE: mode=full&template=login}
style="background-image: url({BGIMAGE})'
this can be customized in theme template.
Any element defined for layout by theme.
{LAYOUT_ELEMENT: mode=full&element=title}
returns title element for full layout.

Introduction to JM Theme plugin

This plugin was first time introduced with the Gaia theme and Open Mind theme.  It solved some missing functionality in the Theme manager.  During the time some of its functionality was moved to the core and some of it was improved.

Author note.  This plugin is paid. Sorry, too much time without any feedback was spent on it to give it for free. All my ideas related to this plugin were shared with core developers, some of them are now part of the core, some were declined. Moving to core complicated my own development and I needed to rewrite everything from the beginning.  And then to find a solution to have it worked with older themes.The donation for this plugin is more about supporting the next development, so here are rules
  • if you donated it, you can use it with any themes and how times you want.
  • if you donated it with any our premium theme, you will not pay it again with the next theme. You will get a coupon or better price to save your money. To say that you have this plugin is not enough to get better price, it was never free. I am not stupid. If I don't track you as a donator, I want some confirmation about your donation. 
  • this applies for AppStrap theme too, although old version uses other plugin. But it helped me to get this idea.


What was removed in version 2.1:

- navigation builder. It's not needed anymore. With HTML files is easy to test the new version.  

- custom fields not related to layout (use JM Elements for this)

Changes for version 2.2:

- this version works only with e107 2.3.1 up

- it uses the same table as 2.1.3 and newer, so no changes in the database are needed. 

- it will work only with HTML layouts and only folder for saving layout options is jmtheme inside theme folder

Installation and basic use

How to install it?

After download, you need to upload this plugin via FTP or upload via plugin manager. 

Then you can install it manually via Menu Manager or via the shortcut in the Theme manager. 

You should install this plugin before theme installation (because the theme is packed with default data for this plugin),  but it's no problem anymore. With our themes, there is an option to import demo content after installation directly in Theme manager or you can import just data for this plugin via Database/Tools.  In this case, look for XML file inside the install folder like install_layouts.xml or demo_layouts.xml. 

How to use it?

If you use this plugin with our theme, you should know:

- there is the folder jmtheme inside your theme with option files (filename starts with word "option_")   Those files are already prepared for your theme. You should change them only if you want to extend your theme.

- there can be the jmtheme template in your templates folder if the theme displays images (or other fields) different way. Any HTML output is done by templates or your inserted values, nothing is hardcoded.

If you use this plugin with your own theme, you should know:

- there is the folder "default" inside the plugin folder with default options. You should move it to your theme to folder jmtheme. Under theme you can modify it, create copy, and have more option sets, etc.

- jmtheme template uses 2 keys for images: cssinline and bgimage.  Maybe you need your own version for bgimage markup, so copy it standard way to your theme templates folder and customize it to your needs.

Layout configuration

After installation (without import demo content) admin screen looks like this:


If you click on the button Generate All Layouts, default data will be filled. But you can add layout manually, copy existing... it's a standard Admin UI solution. For generating is sitetheme_layouts preference used, not XML file, so anything is wrong, check the value of this preference.

Default values for option settings are:

- for themes with HTML layout: setting: default, header_default.html, footer_default.html

- for themes with PHP layout:  setting: default, header-default.php, footer-default .php(it is for back compatibility with our old themes)



Field name Description Note
Layout name name of your layout (theme.xml, then in pref) dropdown
Admin menu title Menu name for this layout on the left side, just text field, free change it
Theme name Actual theme name. Normally only layouts for actual frontend theme are displayed. When you switch between themes, you would need to set everything again. So it saves settings for more than one theme. In edit mode, you can edit this field. No dropdown, just text field. You should know what you are doing.
Custom header The selected custom header for this layout. Available headers are in folder headers in your theme.  see info about magic shortcode {---HEADER---} and shortcode {JM_CUSTOMHEADER}
Custom footer The selected custom footer for this layout. Available headers are in folder footers in your theme.  see info about magic shortcode {---FOOTER---} and shortcode {JM_CUSTOMFOOTER}
Setting Selected file with custom fields for this layout. 

Fields editable for each layout depends on your setting file.  For information about how to use those fields, see available shortcodes.