in reply to Re: Effective ways to 'write' html.
in thread Effective ways to 'write' html.
Let's take, for example, a database pull that prints out entries grouped by day. Let's say we do this for a month, and there's a fairly good number of entries. If you're using DBI, all you have to do is just loop over your rows, printing out the data and, if you've come upon a new day, possibly a date header. However, with templates, you can't do this. You have to read all the data in, process it into its day and entry groups, and then pass it off to the template.
What would make life a whole lot easier is if I could move all my HTML strings out into one file where the strings are named or identified somehow, then print those named (and processed, if they contain variable subs) strings. Then I remove the HTML from my script without losing any of the very clean, efficient functionality of my processing.
Does anyone know of any modules that do that? It's not really a 'template', so to speak, but a connection of named lines.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Effective ways to 'write' html.
by davorg (Chancellor) on Dec 19, 2000 at 18:47 UTC | |
by Hrunting (Pilgrim) on Dec 19, 2000 at 19:26 UTC |