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:
redmatrix 2016-08-24 13:11:01 -07:00
parent 4c840d70a4
commit dd654b9766

View File

@ -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();