Page 1 of 1

Smarty problems

Posted: Sat Oct 21, 2006 2:56 pm
by pedro84
I have just installed Smarty System.
It looks nice.
But I have questions about it:
1. can I move files from libs directory anywhere? they are in my root directory, but I don;t want to:) I tried do it but I can;t. I'm too stupid:(
2. Second and last, how to create..pages different than index.php?? Cry

Forgive my, but I'm n00bie to php. I prefered HTML+CSS.

Greetings
Pedro

Posted: Sat Oct 21, 2006 4:03 pm
by jmut
http://smarty.php.net/manual/en/index.php

is your friend.
try doing some simple stuff first.
You can put smarty dir anywhere you want. just include it correctly (having read permissions with web user of course).

for any concrete problems let us know.

Posted: Sat Oct 21, 2006 4:09 pm
by pedro84
When I moved them i got this:

Code: Select all

Warning: Smarty error: unable to read resource: "ex.tpl" in c:\usr\apache\httpd\html\Smarty-2.6.14\libs\Smarty.class.php on line 1095

Posted: Sun Oct 22, 2006 1:09 am
by jmut
pedro84 wrote:When I moved them i got this:

Code: Select all

Warning: Smarty error: unable to read resource: "ex.tpl" in c:\usr\apache\httpd\html\Smarty-2.6.14\libs\Smarty.class.php on line 1095
so you are moving the /templates directory where all templates are located not...the smarty lib itself.

http://smarty.php.net/manual/en/api.var ... mplate.dir

Code: Select all

you can set it using

$smarty->template_dir = 'fullpath/to/directory/where/put/all/templates';     //by default this is /templates
edit: also make sure your templates_c (cache) directory is write-able by the web user...by default smarty is caching.