|
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 |
hassan68 Smarty Rookie
Joined: 27 Apr 2011 Posts: 21
|
Posted: Fri Jun 06, 2014 9:43 am Post subject: how we can use multi form directory with variable |
|
|
when i use
display("file:[z]$formtplmodel.tpl");
i have error
Fatal error: Uncaught --> Smarty: Unable to load template file '[z]default.tpl' <-- thrown in C:\wamp\www\yazdnew\admin\libs\sysplugins\smarty_internal_templatebase.php on line 127 |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Sat Jun 07, 2014 1:01 am Post subject: |
|
|
Have your tried the directory index with quotes?
Code: | display("file:['z']$formtplmodel.tpl"); |
|
|
Back to top |
|
hassan68 Smarty Rookie
Joined: 27 Apr 2011 Posts: 21
|
Posted: Sat Jun 07, 2014 5:09 pm Post subject: |
|
|
U.Tews wrote: | Have your tried the directory index with quotes?
Code: | display("file:['z']$formtplmodel.tpl"); |
|
again error
Fatal error: Uncaught --> Smarty: Unable to load template file '['z']default.tpl' <-- thrown in C:\wamp\www\yazdnew\admin\libs\sysplugins\smarty_internal_templatebase.php on line 127 |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Sun Jun 08, 2014 11:54 am Post subject: |
|
|
How did you setup your template directories?
Make
Code: | var_dump($smarty->template_dir); |
just before your display call to check if a directory entry for [z] exists.
Check if 'default.tpl' does exists in that folder.
btw I was wrong.
The index in display must be without quotes.
Code: | display("file:[z]$formtplmodel.tpl"); |
|
|
Back to top |
|
hassan68 Smarty Rookie
Joined: 27 Apr 2011 Posts: 21
|
Posted: Sun Jun 08, 2014 4:55 pm Post subject: |
|
|
worked fine
Code: |
display("file:[z]$formtplmodel.tpl");
|
i have A small problem in my tpl name
defult error
default ok
tnx U.Tews |
|
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
|