Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
Smarty 3.1 - New template function

 
Post new topic   Reply to topic    Smarty Forum Index -> Tips and Tricks
View previous topic :: View next topic  
Author Message
Sybux2000
Smarty Rookie


Joined: 27 Feb 2005
Posts: 13

PostPosted: Mon Oct 10, 2011 9:25 pm    Post subject: Smarty 3.1 - New template function Reply with quote

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
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7285
Location: Lincoln Nebraska, USA

PostPosted: Mon Oct 10, 2011 9:29 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Tips and Tricks All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP