Re: [SMARTY] newbie: templates dir position...
| From: | Ray | Date: | Thu, 16 May 2002 20:19:53 +0000 |
| Subject: | Re: [SMARTY] newbie: templates dir position... | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-4248@lists.php.net to get a copy of this message | ||
That and any images, CSS, JS files you expect to use for the site.
----- Original Message -----
From: "Monte Ohrt" <monte@ispi.net>
To: "Thanasis Polihronakis" <babbos@eyersee.org>
Cc: <smarty-general@lists.php.net>
Sent: Thursday, May 16, 2002 2:09 PM
Subject: Re: [SMARTY] newbie: templates dir position...
> FYI, Nothing _needs_ to be under the document root except your php
> scripts that are executed by the browser.
>
> When you enstantiate smarty, set the directories.
>
> include('Smarty.class.php');
>
> $smarty = new Smarty;
>
> $smarty->template_dir = '/path/to/templates';
> $smarty->compile_dir = '/path/to/templates_c';
> $smarty->config_dir = '/path/to/configs';
>
> // this will use /path/to/templates/index.tpl
> $smarty->display('index.tpl');
>
> Thanasis Polihronakis wrote:
> >
> > Hello,
> >
> >
> > I'm trying to setup smarty to our already in development project and i
> > encounter some difficulties.
> > I've looked through the digest but i found noone mentioning this
> > problem... or i cant understand the obvious...
> >
> > I have put the smarty classes outside my document root in the classes
> > directory with all the other classes i have.
> > Initialises perfectly and is working.
> >
> > Created a templates/ and templates_c/ dir in document root, and was able
> > to see the 'hello world' thingy ;)
> >
> > now the problem is that when i try to GET a say /folder/script.php file
> > that calls smarty templates, smarty tryes to find the template in
> > /folder/templates/ which is fine, but also tryes to create the
> > templates_c dir in the /folder folder... which is not fine...
> >
> > Do i have to create templates and templates_c folders in each of every
> > folder/subfolder i have?
> >
> > I have tryed every possible combination with SMARTY_DIR but no luck...
> >
> > The ideal solution would be to have templates and templates_c
> > directories out of my document root, can this be done with smarty?
> >
> > What am i doing wrong?
> >
> > babbos
> >
> > ______________________
> > http://eyersee.org
> >
> >
>
>
>
> --
> Monte Ohrt <monte@ispi.net>
> Director of Technology, ispi Inc.
>
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>