|
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 |
phurba Smarty n00b
Joined: 10 May 2003 Posts: 2 Location: New York City
|
Posted: Sat May 10, 2003 5:08 pm Post subject: Novice Developer |
|
|
Hi.
Not to sound stupid, but I'm going through the setup of Smarty and am stuck as follows:
"Warning: Smarty error: unable to read template resource: "index.tpl" in /usr/share/php/libs/Smarty.class.php on line 1042"
I'm unable to make out the character in the tutorial file "index.tpl":
{* Smarty *}
Hello, {$name}!
my cut and paste is reproducing an exclamation point, but I don't believe that ought to be the character. Also, as the file extension is .tpl I am unclear as to whether the code is to be enclosed as a php file or not.
Can anyone help?
Thanks
Mike |
|
Back to top |
|
AZTEK Smarty Pro
Joined: 16 Apr 2003 Posts: 235 Location: Purdue University
|
Posted: Sat May 10, 2003 5:38 pm Post subject: |
|
|
Is the file in the template directory? _________________ "Imagine a school with children that can read and write, but with teachers who cannot, and you have a metaphor of the Information Age in which we live." -Peter Cochrane |
|
Back to top |
|
phurba Smarty n00b
Joined: 10 May 2003 Posts: 2 Location: New York City
|
Posted: Sat May 10, 2003 5:51 pm Post subject: Reply |
|
|
The file resides in the following directory:
/smarty/templates
NOT in
/smarty/guestbook/templates
Should I create a templates directory in guestbook?
Thanks
Mike |
|
Back to top |
|
AZTEK Smarty Pro
Joined: 16 Apr 2003 Posts: 235 Location: Purdue University
|
Posted: Sat May 10, 2003 6:54 pm Post subject: |
|
|
just set the $template_dir param for smarty class to the path where you templates reside. You may also need to set others like $compile_dir _________________ "Imagine a school with children that can read and write, but with teachers who cannot, and you have a metaphor of the Information Age in which we live." -Peter Cochrane |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Sat May 10, 2003 7:02 pm Post subject: |
|
|
Not to be rude, but have you read the material on installation in the manual yet? Have you looked at the FAQ at the Wiki? have you searched the forums? |
|
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
|