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

include

 
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
cam
Smarty Rookie


Joined: 17 Jul 2003
Posts: 9
Location: France, Grenoble

PostPosted: Thu Jul 17, 2003 2:39 pm    Post subject: include Reply with quote

Sorry but I have again a little problem, but this time is with 'include'

In index.tpl :

{include_php file="consulter_liste.php"}

In the .php :

$smarty->assign('liste',$liste);

I don't want to write : $smarty->display('index.tpl'); because, I don't want to print index.tpl.
I just like to transfer $liste to the index.tpl.

What I have to write ??
Thank you very much


Last edited by cam on Wed May 05, 2010 10:42 pm; edited 1 time in total
Back to top
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Thu Jul 17, 2003 4:05 pm    Post subject: Reply with quote

you want to transfer data from the included "consulter_liste.php" into the template??

do: $this->assign('liste', $liste); inside the included php-file
and use {$liste} afterwards in index.tpl.

but maybe you mean something else, your post is not 100% clear to me Smile
Back to top
View user's profile Send private message Send e-mail Visit poster's website
atpower
Smarty Rookie


Joined: 23 Jul 2003
Posts: 6

PostPosted: Tue Aug 05, 2003 1:32 am    Post subject: Reply with quote

sorry for my unwisdom.But why you need to include the .php file into the tpl file? you can include the .php file into the .php file which you used to display the .tpl file,it's easier to use the $smarty->assign().why not
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