Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

fetch a template from second template dir

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Feature Requests
View previous topic :: View next topic  
Author Message
Shioxx
Smarty n00b


Joined: 24 Dec 2012
Posts: 1

PostPosted: Mon Dec 24, 2012 2:23 pm    Post subject: fetch a template from second template dir Reply with quote

I would like to have a feature that always me to fetch a template from a given source.

For example if the template dirs are set like this

Code:
setTemplateDir( array(
         'Alpha' => "/templates",
         'Beta' => "/btemplates",
      ));


so i can fetch the handler.tpl from the template pool "Beta" even if it exists in "Alpha".

$smarty->fetch( "handler.tpl", "Beta");

So i get the handler.tpl from Beta even through it exists in both directorys.
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Mon Dec 24, 2012 7:55 pm    Post subject: Reply with quote

Code:
$smarty->fetch( "[Beta]handler.tpl");


See http://www.smarty.net/docs/en/resources.tpl#templates.from.specified.template.dir
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Feature Requests 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