Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
02-27-2007, 07:28 PM #1
- Join Date
- Dec 2005
- Thanked 0 Times in 0 Posts
making a extended setup for smartly effectively ??
suppose i have follwing file structure
wwwroot>libs>smarty>Smarty.class.php wwwroot>templates ---------->c_templates wwwroot>admin>templates ------------------->c_templates wwwroot>includes>smartySetup.php
$smarty = new Smarty;
$smarty->compile_dir = "C_TEMPLATE_DIR";
$smarty->template_dir = "C_TEMPLATE_DIR";
1>sometimes the templates and c_templates are in admin and sometimes in wwwroot and sometimes may be in other directory
and the smarty setup file is in wwwroot>includes>smartySetup.php , which is included while displaying the .tpl file
what i want:
i want to make the path dynamic so that it works in all the cases , No matter where the smarty,templates,c_templates folder are .
i wanna know:
making different compile fodler is effective (for example i have made one for admin templates and for wwwroot folder)
or making only one ?
Hope for the Best.
Thanks in advance to all of YOU !!
02-27-2007, 10:53 PM #2
- Join Date
- Sep 2005
- Thanked 36 Times in 35 Posts
there's not really a need to have separate compile directories, better to keep that separate and individual as it needs to be writable, and other things don't and shouldn't be.
As for templates, I normally use something like:
/ templates/ admin/ main/ shared/