|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
Sybux2000 Smarty Rookie
Joined: 27 Feb 2005 Posts: 13
|
Posted: Mon Oct 10, 2011 9:25 pm Post subject: Smarty 3.1 - New template function |
|
|
Hi,
I've just updated from 2.x to 3.1 and discover the new template usage.
I've redifined my loader as follow :
Code: | $smarty->setTemplateDir(array(
'default' => $BASE_FILE . $CFG->ThemePath . 'default/'
'theme1' => $BASE_FILE . $CFG->ThemePath . 'theme1/'
)); |
but now. What's else ? How to use it ? How to select the Theme ?
Is there a way to get this value (would be nice to define the CSS in TPL file).
Thx in advance for your help. |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Mon Oct 10, 2011 9:29 pm Post subject: |
|
|
Maybe helpful, from 3.1 release notes:
Quote: | Adressing a specific $template_dir
Smarty 3.1 introduces the $template_dir index notation.
$smarty->fetch('[foo]bar.tpl') and {include file="[foo]bar.tpl"}
require the template bar.tpl to be loaded from $template_dir['foo'];
Smarty::setTemplateDir() and Smarty::addTemplateDir() offer ways to
define indexes along with the actual directories.
|
|
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|