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

Is it possiable to do this in smarty3?

 
Post new topic   Reply to topic    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:   
Post new topic   Reply to topic    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