Template Toolkit and databases

Andrew Wilson andrew-belfastpm at rivendale.net
Mon Jul 23 12:24:05 CDT 2001


On Mon, Jul 23, 2001 at 06:03:07PM +0100, Andrew McFarland wrote:
> I'm unsure of the best way of putting the content into the database. At the 
> moment it could conceivably be any HTML that can legally go in the body of 
> an HTML 4.01 strict document. Should I just put all the content - tags and 
> all - into one field in the database?
> 
> I want to have the content completely separate from the layout, but I also 
> want to be as flexible and as future proof as possible. Any thoughts anyone?

Hi Andrew

Much as I hate to agree with Marc ;-), I wouldn't put HTML in the database
either if I could avoid it.

I would try to do as much as possible with templates, mop up the rest with CGI.pm
and just store plain text in the database.  If you actually store the markup
(HTML) with the data, it makes it much harder to maintain both.

Just my GBP 0.02

cheers

Andrew
--
Yet another Andy W



More information about the Belfast-pm mailing list