1
0
Fork 0

replace macros

implement new replaceMacros function
This commit is contained in:
Adam Magness 2018-10-31 10:35:50 -04:00
commit 91facd2d0a
91 changed files with 335 additions and 249 deletions

View file

@ -164,7 +164,7 @@ $tpl = get_markup_template('mytemplate.tpl', 'addon/addon_name/');
# apply template. first argument is the loaded template,
# second an array of 'name' => 'values' to pass to template
$output = replace_macros($tpl, array(
$output = Renderer::replaceMacros($tpl, array(
'title' => 'My beautiful addon',
));
```

View file

@ -20,10 +20,10 @@ Templates that are only used by addons shall be placed in the
directory.
To render a template use the function *get_markup_template* to load the template and *replace_macros* to replace the macros/variables in the just loaded template file.
To render a template use the function *getMarkupTemplate* to load the template and *replaceMacros* to replace the macros/variables in the just loaded template file.
$tpl = get_markup_template('install_settings.tpl');
$o .= replace_macros($tpl, array( ... ));
$o .= Renderer::replaceMacros($tpl, array( ... ));
the array consists of an association of an identifier and the value for that identifier, i.e.