Knowledge Base

Available shortcodes

on Wednesday 28 August 2019
comments: 0

 Available shortcodes and how to use them

{DEFAULT_MENUAREA=100} version 1.0 up

it displays menus set for menuarea number 100 for default layout for any other layout. The same content like {MENUAREA=100} or {MENU=100} in default layout. It's very helpful if you have more footers with the same menus. More info.

{JM_CUSTOMHEADER}version 2.1 up it displays the content of header set for actual layout.  Now can be replaced with magic shortcode {---HEADER---}
{JM_CUSTOMHEADER: header=primary} it displays primary header (it is looking for html file in your theme/headers/header_* - in this case, header_primary.html).  This version is used mainly for custom pages (with correct template each custom page can have different header/layout)

{LAYOUT_BGIMAGE: template=bgimage} 

version 1.0 up

it displays background header image set for layout. It is special shortcodes for the header image, because, by default, you can set no image, external image (shortcodes work too) or image from media manager.  What is returned is set by template. Example:

$JMTHEME_TEMPLATE['bgimage'] = '<div class="image" style="background-image: url({BGIMAGE})"></div>';
$JMTHEME_TEMPLATE['cssimage'] = 'style="background-image: url({BGIMAGE})';

{LAYOUT_ELEMENT: element=title} 

version 1.0 up

It displays the value of the layout field for actual layout. It's good practice to write this shortcode to the description of your layout field. 

it replaces shortcodes. 

The output is not hardcoded. You can template it by using the template parameter. 

Parameter layout is ignored from version 2.1. It uses always actual layout.

{JM_CUSTOMFOOTER} version 2.1 up it displays the content of footer set for actual layout.  Now can be replaced with magic shortcode {---FOOTER---}
{JM_CUSTOMFOOTER: header=black} it displays black footer (it is looking for html file in your theme/footers/footer_* - in this case, footer_black.html).  This version is used mainly for custom pages (with correct template each custom page can have different footer/layout)