|
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 |
bits_bytes Smarty Rookie
Joined: 14 Oct 2003 Posts: 8
|
Posted: Tue Oct 14, 2003 2:51 pm Post subject: several folders for $compile_dir and $template_dir |
|
|
hi,
sorry for my english, but i try
short question:
My Problem:
I have several template-files for my program. These files are in $template_dir.
But i want to make another dir called "usertemplates" which is a subfolder of $template_dir.
But all tpl-files in that subfolder wont be compiled, because $compile_dir donŽt know that there is a subfolder.
My question:
Is it impossible that i can define serveral folders in Smarty.class.php for $compile_dir and $template_dir?
I hope somebody can understand my english.
cu Andreas |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Tue Oct 14, 2003 4:07 pm Post subject: |
|
|
you can do this (without multiple $smarty->temlate_dirs):
you have:
templates/index.tpl
templates/userfolder/index.tpl
and then display for example:
$smarty->display('index.tpl'); and
$smarty->display('userfolder/index.tpl');
and in the template for example:
{include file="index.tpl"} and
{include file="userfolder/index.tpl"}
in short: simply use paths relative to $smarty->template_dir |
|
Back to top |
|
bits_bytes Smarty Rookie
Joined: 14 Oct 2003 Posts: 8
|
Posted: Wed Oct 15, 2003 8:51 am Post subject: |
|
|
thanks for the fast answer.
IŽll try your solution at once.
cu Andreas |
|
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
|