|
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 |
p-jay Smarty Rookie
Joined: 30 Aug 2011 Posts: 7
|
Posted: Tue Aug 30, 2011 6:36 am Post subject: inserer un tpl dans un autre tpl |
|
|
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 |
|
cobex4 Smarty Regular
Joined: 02 Sep 2008 Posts: 74
|
Posted: Wed Aug 31, 2011 12:36 pm Post subject: |
|
|
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 |
|
p-jay Smarty Rookie
Joined: 30 Aug 2011 Posts: 7
|
Posted: Fri Sep 02, 2011 10:57 pm Post subject: |
|
|
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 |
|
p-jay Smarty Rookie
Joined: 30 Aug 2011 Posts: 7
|
Posted: Tue Sep 06, 2011 4:34 am Post subject: |
|
|
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 |
|
goalsurfer Smarty Rookie
Joined: 30 Oct 2009 Posts: 29 Location: Brussels
|
Posted: Thu Oct 13, 2011 7:23 am Post subject: |
|
|
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 |
|
|
|
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
|