string smarty_function_pnpagegetvar(
array $params, object &$smarty, string $name, bool $html, string $assign)
|
|
Smarty function to get page variable
This function obtains a page-specific variable from the Zikula system.
Available parameters:
- name: The name of the page variable to obtain
- assign: If set, the results are assigned to the corresponding variable instead of printed out
Zikula doesn't impose any restriction on the page variabl's name except for duplicate and reserved names. As of this writing, the list of reserved names consists of
- title
- description
- keywords
- stylesheet
- javascript
- body
- rawtext
- footer
Example <!--[pnpagegetvar name="title"]-->
Tags:
Parameters
| array |
$params |
All attributes passed to this function from the template |
| object |
&$smarty |
Reference to the Smarty object |
| string |
$name |
Name of the page variable to get |
| bool |
$html |
(optional) If true then result will be treated as html content |
| string |
$assign |
(optional) If set then result will be assigned to this template variable |