For Programmers: Free Programming Magazines  


Home > Archive > PHP Smarty Templates > May 2004 > Parsing content from different resources









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Parsing content from different resources
Dorthe Luebbert

2004-05-07, 2:48 am

Hi,

I have templates in files containing Smarty variables.
I have database content containing Smarty variables (not complete
templates).
Both variable types are used in one template.
I want both variable types to be parsed by Smarty.

I do it like this:

First I assign the "normal" variables to Smarty
Then I use fetch() to parse the "normal" variables
Then I use display() with a memory resource plugin to replace the
database content.

This means double work for Smarty (performance..). Is there a better way
to do it?

Thanx

Dorthe
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com