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 -> Language: French
View previous topic :: View next topic  
Author Message
pendragon509
Smarty n00b


Joined: 11 Oct 2005
Posts: 3

PostPosted: Tue Oct 11, 2005 2:14 pm    Post subject: include Reply with quote

Bonjour, je voudrais inclure un fichier template dans un autre fichier.
J'ai bien essayé {include file="cnt_bloc_info.tpl"}
mais voici l'erreur obtenue :

Code:
Warning: Smarty error: unable to read resource: "cnt_bloc_info.tpl" in /bo/lib/smarty/Smarty.class.php on line 1121


Merci d'avance
Back to top
View user's profile Send private message
Pim
Smarty n00b


Joined: 13 Oct 2005
Posts: 2

PostPosted: Thu Oct 13, 2005 6:04 pm    Post subject: Reply with quote

Salut,

A première vue, je dirais que ton fichier cnt_bloc_info.tpl ne se trouve pas dans le répretoire $template_dir.

Autrement, en ce qui me concerne, pour inclure des templates dans d'autres, je préfère utiliser la méthode fetch, qui permet de récupérer le résultat de la compilation d'un template dans une variable. Cette variable, je l'assigne à mon template et je l'affiche où je veux ensuite. Je ne sais pas si c'est plus rapide, plus pratique, plus propre, plus n'importe quoi, mais ça marche...
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 -> 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