|
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 |
yarco Smarty Regular
Joined: 20 Mar 2009 Posts: 39
|
Posted: Mon Mar 23, 2009 3:24 am Post subject: Is it possiable to do this in smarty3? |
|
|
(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 |
|
yarco Smarty Regular
Joined: 20 Mar 2009 Posts: 39
|
Posted: Mon Mar 23, 2009 3:48 am Post subject: get it... |
|
|
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 |
|
|
|
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
|