e107sk.com

Theme configuration as shortcodes

on Friday 01 May 2020
comments: 0

In theme_shortcodes.php  file:

function sc_theme_pref($parm) 
{ 

$name = $parm['name'];
if(!isset($name)) 
{
return "";
}
$default = $parm['default'];

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

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

return $value; 

}


Example:

{THEME_PREF: code=header_width&default=container}

code: theme preference name

default: default value if the preference is not set 

Used in:

LandingZero2

0 Comments

Other links

Follow us