Function __global->find_template_place
Definitions
sources/global3.php
- Search for a template.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
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 |
| $theme | ID_TEXT | No | No | required parameter | N/A | N/A | The theme to use |
| $suffix | string | No | No | required parameter | .tpl .js .xml .txt .css | N/A | File type suffix of template file (e.g. .tpl) |
| $directory | string | No | No | required parameter | templates javascript xml text css | N/A | Subdirectory type to look in |
| $non_custom_only | boolean | No | No | False | N/A | N/A | Whether to only search in the default templates |
| $fallback_other_themes | boolean | No | No | True | N/A | N/A | Allow fallback to other themes, in case it is defined only in a specific theme we would not normally look in |
Returns
- List of parameters needed for the _do_template function to be able to load the template (null: could not find the template)
- Type: ?array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Search for a template.
*
* @param ID_TEXT $codename The codename of the template being loaded
* @param ID_TEXT $theme The theme to use
* @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
* @param boolean $non_custom_only Whether to only search in the default templates
* @param boolean $fallback_other_themes Allow fallback to other themes, in case it is defined only in a specific theme we would not normally look in
* @return ?array List of parameters needed for the _do_template function to be able to load the template (null: could not find the template)
*/
function find_template_place(string $codename, string $theme, string $suffix, string $directory, bool $non_custom_only = false, bool $fallback_other_themes = true) : ?array
* Search for a template.
*
* @param ID_TEXT $codename The codename of the template being loaded
* @param ID_TEXT $theme The theme to use
* @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
* @param boolean $non_custom_only Whether to only search in the default templates
* @param boolean $fallback_other_themes Allow fallback to other themes, in case it is defined only in a specific theme we would not normally look in
* @return ?array List of parameters needed for the _do_template function to be able to load the template (null: could not find the template)
*/
function find_template_place(string $codename, string $theme, string $suffix, string $directory, bool $non_custom_only = false, bool $fallback_other_themes = true) : ?array

