1
0
Fork 0

get markup template

implement getMarkupTemplate function
This commit is contained in:
Adam Magness 2018-10-31 10:44:06 -04:00
commit 35abc4bb64
89 changed files with 243 additions and 243 deletions

View file

@ -160,7 +160,7 @@ In your code, like in the function addon_name_content(), load the template file
```php
# load template file. first argument is the template name,
# second is the addon path relative to friendica top folder
$tpl = get_markup_template('mytemplate.tpl', 'addon/addon_name/');
$tpl = Renderer::getMarkupTemplate('mytemplate.tpl', 'addon/addon_name/');
# apply template. first argument is the loaded template,
# second an array of 'name' => 'values' to pass to template

View file

@ -22,7 +22,7 @@ directory.
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');
$tpl = Renderer::getMarkupTemplate('install_settings.tpl');
$o .= Renderer::replaceMacros($tpl, array( ... ));
the array consists of an association of an identifier and the value for that identifier, i.e.