![]() |
|
#1
|
||||
|
||||
Need suggestions on a template systemI am in somewhat desperate need for a php based template system. I have had good luck Templatepower but it seems to have broken on my current webhost. I can't really figure out why...so I am looking to try out some other options (not Smarty).
I am looking for a simple system...my alternative will be to just use php includes. |
||||
|
#2
|
||||
|
||||
|
I have tried many ideas to create my own PHP template system. I am still refining it, still haven't plugged in the "conditional" template functionality to it so I still have much to do to be able to share the PHP class with you.
However, I can tell you what it uses to get the job done... You just prepare your HTML templates and store them in a convenient place (like a database table). In your templates, you just assign $variable names where you want your dynamic data to appear. In your scripts, you just gather the dynamic data into variables or into an array (say $TPL_VARS['variable']) and pass it to a function that simply extract()s $TPL_VARS and eval()s the template string... VERY simple idea, not original of course but it get's the job done very well. __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
Recent GIDBlog
Problems with the Navy (Chiefs) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| hashing help | saiz66 | C++ Forum | 1 | 06-Jul-2004 07:16 |
| how do you seo a content management system | JUNK KED | Search Engine Optimization Forum | 4 | 07-Jun-2004 23:50 |
| How do I detect flash version on my computer system? | rhino1616 | Graphics Forum | 2 | 23-Oct-2003 10:14 |
| i = system ("cd c:\text"); :( | kyle | C Programming Language | 1 | 25-Aug-2003 12:43 |
| Link to our site suggestions / ideas | jrobbio | Advertising & Affiliates Forum | 2 | 02-Apr-2003 03:37 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The