azett 52bf429a01 Replaced Smarty 2.6.31-dev with v 4.0.4, keeping the FP-specific Smarty plugins.
Updated calls to current Smarty API (register_function()/register_modifier()/register_block() -> registerPlugin(); assign_by_ref() -> assignByRef()).
Fixed file includes in templates with quotes.
Removed SmartyValidate.class.php includes.

Still work in progress as some errors still appear!
2022-01-23 15:02:33 +01:00

38 lines
700 B
Markdown

getTemplateVars()
returns assigned variable value(s)
Description
===========
array
getTemplateVars
string
varname
If no parameter is given, an array of all [assigned](#api.assign)
variables are returned.
<?php
// get assigned template var 'foo'
$myVar = $smarty->getTemplateVars('foo');
// get all assigned template vars
$all_tpl_vars = $smarty->getTemplateVars();
// take a look at them
print_r($all_tpl_vars);
?>
See also [`assign()`](#api.assign),
[`{assign}`](#language.function.assign), [`append()`](#api.append),
[`clearAssign()`](#api.clear.assign),
[`clearAllAssign()`](#api.clear.all.assign) and
[`getConfigVars()`](#api.get.config.vars)