provide a mechanism for global template values (macro replacements that are available to all templates). There's a strong likelihood this list will increase but we may wish to actively prevent it from mushrooming out of control.
This commit is contained in:
parent
4c840d70a4
commit
dd654b9766
@ -27,6 +27,12 @@ class SmartyTemplate implements TemplateEngine {
|
||||
|
||||
public function replace_macros($s, $r) {
|
||||
$template = '';
|
||||
|
||||
// these are available for use in all templates
|
||||
|
||||
$r['$z_baseurl'] = z_root();
|
||||
$r['$z_server_role'] = \Zotlabs\Lib\System::get_server_role();
|
||||
|
||||
if(gettype($s) === 'string') {
|
||||
$template = $s;
|
||||
$s = new SmartyInterface();
|
||||
|
Reference in New Issue
Block a user