Re: [SMARTY] Templates in DB
| From: | Jason Sweat | Date: | Sun, 02 Jun 2002 12:38:12 +0000 |
| Subject: | Re: [SMARTY] Templates in DB | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-4499@lists.php.net to get a copy of this message | ||
For basics on how to use Smarty & PEAR DB, take a look at
http://www.zend.com/zend/tut/tutsweatpart1.php
and
http://www.zend.com/zend/tut/tutsweatpart2.php.
This series of tutorials is
on just that subject.
These tutorials deal with regular template, but there is a way to override
the default template resource and retrieve them from a database. You might
try searching this list archive, I think this topic was discussed around
Nov-Dec of last year.
Hope that helps.
Jason
----- Original Message -----
From: "Simon H" <simon.hamilton@ntlworld.com>
To: "Smarty-General" <smarty-general@lists.php.net>
Sent: Sunday, June 02, 2002 7:25 AM
Subject: [SMARTY] Templates in DB
> Hi All!!
>
> I'm very new to Smarty, and am trying to retrieve both site content/block
> contents and templates from a DB.
>
> Starting with the template; I found info on this in the documentation at:
>
> http://smarty.php.net/manual/en/plugins.resources.html
>
> So I created the plugin accordingly. I haven't ran this yet, as I can't
see how
> it knows what database to connect to, or where the database settings are.
>
> Is the method shown, for use with PEAR DB? If so, where do I put the PEAR
> includes - within the Plugin? Regardless some further information
describing
> how to setup DB connectivity in Smarty for Template/content storage would
be
> most helpful, and much appreciated.
>
> TIA
>
> Simon H
>
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>