New plugin Masthead released
Masthead plugin is the theme plugin for theme developers. It allows more straightforward setting data for the welcome message (for themes with the big header, titles, buttons, and images). It can replace core WMESSAGE functionality and the need for inser
I will write all my new or old bootstrap4 themes in a different way. Just wait for it. I initially planned this plugin as a replacement for limited Welcome message options, but you can use it as a simpler version of JM Element plugin.
Startboostrap themes use Master Head or Masthead area for that big area on the homepage. Only later I found that it has something with Joomla too. So I named this plugin with this name.
You can download this plugin from the Download section or e107.org after approving.
Some screenshots from version 1.0:
The simplified version of JM Element plugin for all future business themes (with the big header on the homepage)
Very simple admin area. If I found the main header that needs more fields, it is easy to add it. There will be a new version then. For now, I tested it with all my bootstrap4 themes and it was enough.
Just set code (mode) and template.
Add needed values. There are prepared shortcodes for 4 titles, 3 images and 3 buttons.
There are prepared demo data in the pack, but this content will come with the theme itself. There are examples for templates too, but again, it should be part of the theme.
There is only one global shortcode with 2 parameters: mode and template. If the template is not set, mode name is used.
There is no menu because you should use this shortcode in HTML layout for homepage. If needed, it can be inserted anywhere and with shortcode menu used in Menu manager too.
Some snippets:
How to replace core welcome message in theme:
function sc_wmessage()
{
if(e107::isInstalled('masthead')) {
$text = '{MASTHEAD: mode='.$this->sitetheme.'}';
$wmessage = e107::getParser()->parseTemplate($text);
if(e_DEBUG && $wmessage == '' ) {
e107::getMessage()->addError('{MASTHEAD: mode='.$this->sitetheme.'&template=agency} is empty. Check if record with this code exists');
}
return $wmessage;
}
return e107::getMessage()->add('Missing plugin!')->render();
}
How to use some background image:
$MASTHEAD_TEMPLATE['creative']['element'] = '
';
How to use agency data with different template:
{MASTHEAD: mode=agency2&template=solid}
Warning: This plugin is no replacement for JM ELements. With JME your options are not limited. This is just a solution for how to create free themes and not be limited with the core.