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

Is it possiable to do this in smarty3?

 
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 -> Smarty 3
View previous topic :: View next topic  
Author Message
yarco
Smarty Regular


Joined: 20 Mar 2009
Posts: 39

PostPosted: Mon Mar 23, 2009 3:24 am    Post subject: Is it possiable to do this in smarty3? Reply with quote

(not pure php template)

Normally our templates wourld be:

index.tpl
+ include file = 'head.tpl'
+ include file = 'foot.tpl'
+ include file = 'other.tpl'
+ ...

But index.tpl seems useless. So can i do this?
Code:

$smarty->display('string: {include file="head.tpl"}{include file="foot.tpl"}...');

So i don't need to create index.tpl file.
Back to top
View user's profile Send private message
yarco
Smarty Regular


Joined: 20 Mar 2009
Posts: 39

PostPosted: Mon Mar 23, 2009 3:48 am    Post subject: get it... Reply with quote

I've just tried it use smarty3's example(test_nocache.php).
I use
Code:

$smarty->display('string:{include file="test_nocache.tpl"}');

instead of
Code:

$smarty->display('test_nocache.tpl');

it works fine.
great job!
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 -> Smarty 3 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