Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

how we can use multi form directory with variable

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
hassan68
Smarty Rookie


Joined: 27 Apr 2011
Posts: 21

PostPosted: Fri Jun 06, 2014 9:43 am    Post subject: how we can use multi form directory with variable Reply with quote

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
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Sat Jun 07, 2014 1:01 am    Post subject: Reply with quote

Have your tried the directory index with quotes?

Code:
display("file:['z']$formtplmodel.tpl");
Back to top
View user's profile Send private message
hassan68
Smarty Rookie


Joined: 27 Apr 2011
Posts: 21

PostPosted: Sat Jun 07, 2014 5:09 pm    Post subject: Reply with quote

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
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Sun Jun 08, 2014 11:54 am    Post subject: Reply with quote

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
View user's profile Send private message
hassan68
Smarty Rookie


Joined: 27 Apr 2011
Posts: 21

PostPosted: Sun Jun 08, 2014 4:55 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP