get markup template
implement getMarkupTemplate function
This commit is contained in:
parent
91facd2d0a
commit
35abc4bb64
89 changed files with 243 additions and 243 deletions
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue