Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > html templating advice.

Reply
Thread Tools

html templating advice.

 
 
lloyd christopher
Guest
Posts: n/a
 
      10-22-2003
im developing a template based web application in perl and need some
guidance. currently its all pretty simple stuff, we tell the designers
place holders to use and then &username; or %USERNAME% or <MYusername/>
would be replaced by the value. basically what the perl cookbook uses in a
few examples iirc.

however more and more we have to deal with more complex data. variable
length lists of data. say for example a list of new products per day, one
day might have 4, one might have 7. so far we tell them to put %TABLE% and
it gets replaced with a preformatted table with lots of id's and classes so
they can customize the look of it.

what i really would like to do though is give them more power. something
along the lines of:

<table>
<mytable>
<tr><td>&product;</td><td>&description;</td></tr>
</mytable>
</table>

and then i can loop through the <mytable>..</mytable> for each one. i can
do this easily enough using regular expressions, but what i'd like to know
is if there are any standards for this sort of thing that already exist, any
modules etc. obviously i'd rather not reinvent the wheel. HTML:arser?
DOM?

(yes i know i keep jumping between styles of placeholders, trying to decide
on whats the best / standard if their is one).

thanks alot sorry for the rambling post.

lloyd christopher
SLOW30


 
Reply With Quote
 
 
 
 
Darin McBride
Guest
Posts: n/a
 
      10-22-2003
lloyd christopher wrote:

> im developing a template based web application in perl and need some
> guidance. currently its all pretty simple stuff, we tell the designers
> place holders to use and then &username; or %USERNAME% or <MYusername/>
> would be replaced by the value. basically what the perl cookbook uses in
> a few examples iirc.


There are a half-bazillion templating systems on CPAN already. If you
find that they don't fit the bill, then look at them to get ideas of
how you may like to proceed, and build on top of them. While I use
HTML::Template for my HTML templating needs, I have other templating
needs that even Text::Template doesn't fit.
 
Reply With Quote
 
 
 
 
lloyd christopher
Guest
Posts: n/a
 
      10-22-2003
ya thats what i'm looking for is some recommendations on the good, the bad,
and the appropriate. As you said, there are a half-bazillion and would take
a while to go through them all..

"Darin McBride" <> wrote in message
news:A4Blb.150214$pl3.6745@pd7tw3no...
> lloyd christopher wrote:
>
> > im developing a template based web application in perl and need some
> > guidance. currently its all pretty simple stuff, we tell the designers
> > place holders to use and then &username; or %USERNAME% or <MYusername/>
> > would be replaced by the value. basically what the perl cookbook uses

in
> > a few examples iirc.

>
> There are a half-bazillion templating systems on CPAN already. If you
> find that they don't fit the bill, then look at them to get ideas of
> how you may like to proceed, and build on top of them. While I use
> HTML::Template for my HTML templating needs, I have other templating
> needs that even Text::Template doesn't fit.



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ANN: Templayer 1.4 - HTML templating library Ian Ward Python 0 09-25-2006 03:18 PM
ANN: Templayer 1.3 - HTML templating library Ian Ward Python 1 08-30-2006 06:18 PM
HTML generation vs PSP vs Templating Engines pkassianidis@gmail.com Python 9 11-20-2005 11:43 PM
Looking for HTML templating system Andreas Schwarz Ruby 9 03-07-2004 11:45 PM
HTML templating that works in more than one language? Ruby Baby Ruby 6 01-24-2004 03:43 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57