Function __global->do_lorem_template
Definitions
sources/lorem.php
- Lorem version of do_template. It will reprocess the template into something that is "stable XHTML" and thus can work inside an XHTML editor.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: object
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $codename | ID_TEXT | No | No | required parameter | N/A | N/A | The codename of the template being loaded |
| $parameters | array | No | No | [] | N/A | N/A | A map of parameters for the template (key to value) |
| $lang | ?LANGUAGE_NAME | No | No | Null | N/A | N/A | The language to load the template in (templates can embed language references) (null: users own language) |
| $light_error | boolean | No | No | False | N/A | N/A | Whether to not produce a stack trace if the template is missing |
| $fallback | ?ID_TEXT | No | No | Null | N/A | N/A | Alternate template to use if the primary one does not exist (null: none) |
| $suffix | string | No | No | .tpl | .tpl .js .xml .txt .css | N/A | File type suffix of template file (e.g. .tpl) |
| $directory | string | No | No | templates | templates javascript xml text css | N/A | Subdirectory type to look in |
Returns
- The Tempcode for this template
- Type: Tempcode
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Lorem version of do_template. It will reprocess the template into something that is "stable XHTML" and thus can work inside an XHTML editor.
*
* @param ID_TEXT $codename The codename of the template being loaded
* @param array $parameters A map of parameters for the template (key to value)
* @param ?LANGUAGE_NAME $lang The language to load the template in (templates can embed language references) (null: users own language)
* @param boolean $light_error Whether to not produce a stack trace if the template is missing
* @param ?ID_TEXT $fallback Alternate template to use if the primary one does not exist (null: none)
* @param string $suffix File type suffix of template file (e.g. .tpl)
* @set .tpl .js .xml .txt .css
* @param string $directory Subdirectory type to look in
* @set templates javascript xml text css
* @return Tempcode The Tempcode for this template
*/
function do_lorem_template(string $codename, array $parameters = [], ?string $lang = null, bool $light_error = false, ?string $fallback = null, string $suffix = '.tpl', string $directory = 'templates') : object
* Lorem version of do_template. It will reprocess the template into something that is "stable XHTML" and thus can work inside an XHTML editor.
*
* @param ID_TEXT $codename The codename of the template being loaded
* @param array $parameters A map of parameters for the template (key to value)
* @param ?LANGUAGE_NAME $lang The language to load the template in (templates can embed language references) (null: users own language)
* @param boolean $light_error Whether to not produce a stack trace if the template is missing
* @param ?ID_TEXT $fallback Alternate template to use if the primary one does not exist (null: none)
* @param string $suffix File type suffix of template file (e.g. .tpl)
* @set .tpl .js .xml .txt .css
* @param string $directory Subdirectory type to look in
* @set templates javascript xml text css
* @return Tempcode The Tempcode for this template
*/
function do_lorem_template(string $codename, array $parameters = [], ?string $lang = null, bool $light_error = false, ?string $fallback = null, string $suffix = '.tpl', string $directory = 'templates') : object

