3 include_once INSTALLATION_PATH
. '/environment/functions/general.php'; // general functions
5 // ---------------------------------------------------
7 // ---------------------------------------------------
10 * Return full path of specific template file
12 * @param string $tpl_file
15 function get_template_path($tpl_file) {
16 return INSTALLER_PATH
. '/installation/templates/' . $tpl_file;
17 } // get_template_path
20 * Assign template variable.
22 * If you want to assign multiple variables with one call pass associative array
23 * through $varname. In that case $varvalue will be ignored!
25 * @param mixed $varname Variable name or associative array of variables that need
27 * @param mixed $varvalue Variable name. If $varname is array this param is ignored
30 function tpl_assign($varname, $varvalue = null) {
31 $template_instance = Template
::instance();
32 if(is_array($varname)) {
33 foreach($varname as $k => $v) {
34 $template_instance->assign($k, $v);
37 $template_instance->assign($varname, $varvalue);
42 * Render template and return it as string
44 * @param string $template Template that need to be rendered
47 function tpl_fetch($template) {
48 $template_instance = Template
::instance();
49 return $template_instance->fetch($template);
53 * Render specific template
55 * @param string $template Template that need to be rendered
58 function tpl_display($template) {
59 $template_instance = Template
::instance();
60 return $template_instance->display($template);