Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

{include} help

 
Post new topic   Reply to topic    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
Min2liz
Smarty n00b


Joined: 29 Mar 2007
Posts: 4
Location: Lithuania

PostPosted: Thu Mar 29, 2007 7:25 pm    Post subject: {include} help Reply with quote

Hello, I trying this:

Code:
{include file="modules/$module/$module_main.tpl"}


Code:
$smarty->assign("module","news");
$smarty->display('index.tpl');


But Smarty don't include file.

Quote:
Warning: Smarty error: unable to read resource: "modules/news/.tpl" in system\class\smarty\Smarty.class.php on line 1095


Who know how to solve this problem?
Back to top
View user's profile Send private message
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Thu Mar 29, 2007 7:36 pm    Post subject: Reply with quote

Smarty thinks you mean "$module_main"

Try backticks. http://smarty.php.net/manual/en/language.syntax.quotes.php
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    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