Content Category Useful Snippets

How to use LAN string in template on 14 Jul 2020


{LAN=THEME_XXX} within the template.

How to rid favicon and use new way on 17 May 2020

 At first, you need to delete favicon.ico file from your root. And check if there is no one in the theme folder.

Then add to your theme class:

e107::link(array('rel'=>"icon", "type"=>"image/png", "href" => THEME_ABS."images/title-img.png"));
e107::link(array('rel'=>"icon", "type"=>"image/png", "href" => SITEURL.e_THEME."pure/images/title-img.png"));

How to replace VIEWPORT in theme.php on 01 May 2020

With version 2.3.0 you get debug error Please place all theme code inside the theme class.


define('VIEWPORT', "width=device-width, initial-scale=1.0");


e107::meta('viewport', 'width=device-width, initial-scale=1.0');

Theme configuration as shortcodes on 01 May 2020

The way how to use values from theme configuration as shortcodes

In theme_shortcodes.php  file:

function sc_theme_pref($parm) 

$name = $parm['name'];
return "";
$default = $parm['default'];

$value = $this->themePrefs[$name];

$value = varset($value, $default);

return $value; 



{THEME_PREF: code=header_width&default=container}

code: theme preference name

default: default value if the preference is not set 

Used in:


Other links

Follow us