Results 1 to 4 of 4
Thread: Smarty Template engine help
Nov 4, 2005, 18:33 #1
Smarty Template engine help
First of all, hi, I'm new here and signed up hoping I could get a solution to this problem and also contribute/learn more from these forums, as they look interesting!
I have an error with Smarty. It can't read a .tpl file.
I have posted the problem on the smarty forums: http://www.phpinsider.com/smarty-for...556&highlight=
I get this error:
Warning: Smarty error: unable to read resource: "admin.tpl" in C:\Program Files\Apache Group\Apache2\hosted\kshdesign\Smarty-2.6.10\libs\Smarty.class.php on line 1088
i also have another template named 'content.tpl' and it loads that one fine...
Nov 4, 2005, 18:39 #2
- Join Date
- Feb 2005
- Universum, 3rd Corner
- 1 Post(s)
- 0 Thread(s)
Hi and welcome to SP!
admin.tpl is probably in the wrong directory.
If I presume that admin.php is placed within admin directory, then admin.tpl should be in templates/admin/ directory.
Make sure it's on the right place.
Or make sure that you gave right path to it in admin.php or whatever the php page is.
-- Jelena --
Nov 4, 2005, 23:50 #3
jelena is right and 1 more have u assign the path where the tpl files stored?-::Ujjwal::-
Visit My Site
Nov 5, 2005, 07:03 #4
THank you SO much, I read jelena's post carefully and then I realised that the file in question (admin/index.php) is in a subdirectory, so i had to re assign in index.php where the actual *.tpl files are located.
In other words:
$smarty->template_dir = "../templates";
$smarty->compile_dir = "../templates_c";
it works, thanks for the help!