tags:

views:

88

answers:

1

If in a php file you had:

$smarty->assign('content','<p>This is some test content</p>');

and in a template file I hadb (just for example purposes):

<html>
<head></head>
<body>{$content}{config_load file='settings.conf'}{#setting1#}</body>
</html>

Would it be possible to load the setting from the config file, from the php file instead of the template file?

+1  A: 

You can load a config file with config_load() and then use get_config_Vars() to obtain a loaded value.

Paul Dixon
Thanks muchly. I'm assuming then most smarty functions can be called outside the template if for example {function_name} would just be as simple as $smarty->function_name() in the php file.
Jenski
If doubt, check the manual :)
Paul Dixon