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

inserer un tpl dans un autre tpl

 
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 -> Language: French
View previous topic :: View next topic  
Author Message
p-jay
Smarty Rookie


Joined: 30 Aug 2011
Posts: 7

PostPosted: Tue Aug 30, 2011 6:36 am    Post subject: inserer un tpl dans un autre tpl Reply with quote

salut

Je cherche à inclure un tpl existant dans un fichier tpl
j'ai donc fait {include file="chemin_du_fichier/nom_du_fichier.tpl"}

la page se charge sans la portion de l'include!!!

Quelle est la méthode?

merci
Back to top
View user's profile Send private message
cobex4
Smarty Regular


Joined: 02 Sep 2008
Posts: 74

PostPosted: Wed Aug 31, 2011 12:36 pm    Post subject: Reply with quote

C'est juste, par contre si ton tpl est dans le même dossier que celui qui l'appel tu fait

Code:
{include file="nom_du_fichier.tpl"}


Librement.
Back to top
View user's profile Send private message
p-jay
Smarty Rookie


Joined: 30 Aug 2011
Posts: 7

PostPosted: Fri Sep 02, 2011 10:57 pm    Post subject: Reply with quote

salut

Le fichier est dans un dossier different malgré le chemin, cela ne marche pas!!

je veux prendre un header pour l'intégrer à un contenu.

Une idee?

merci
Back to top
View user's profile Send private message
p-jay
Smarty Rookie


Joined: 30 Aug 2011
Posts: 7

PostPosted: Tue Sep 06, 2011 4:34 am    Post subject: Reply with quote

je reformule pour une meilleur comprehension.

j'ai deux headers different je souhaite prendre les elements des deux headers pour en faire un seul.

or j'ai pour le premier les dossiers /templates et /template_c
le deuxieme un autre /templates et /template_c

Apparamment un simple include avec le chemin ne fonctionne pas!
Back to top
View user's profile Send private message
goalsurfer
Smarty Rookie


Joined: 30 Oct 2009
Posts: 29
Location: Brussels

PostPosted: Thu Oct 13, 2011 7:23 am    Post subject: Reply with quote

cobex4 wrote:
C'est juste, par contre si ton tpl est dans le même dossier que celui qui l'appel tu fait

Code:
{include file="nom_du_fichier.tpl"}


Librement.


Selon moi il faut seulement mettre le chemin depuis le dossier de base, donc 'templates' mais celui-ci on ne mentionne pas, les autres si. N'importe si les deux files se trouvent dans le même dossier ou non.
Back to top
View user's profile Send private message Visit poster's website
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 -> Language: French 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