HTML indentation not fine

2004-10-13 Thread Anish Kumar K.
I wrote a program which will replace all the hardcoded things to some values specific 
to one client. for example
designed a template 
with body bgcolor=%bg_color%?.

I have a config.txt file which says bg_color=yellow. This may vary with clients...some 
like blue,

I could successfully replace the files. the problem is after the replacing I opened 
the HTML file..The look and feel is dfferent/..It is not ordered say is looks like 
body bgcolor=
 yellow

This comes in two lines or so...I happen to saw some mail regarding indentation of 
HTML files...with some pacakge in perl..It would be nice if someone could shed light 
into this ...

Thanks
Anish



Re: HTML indentation not fine

2004-10-13 Thread Chris Devers
On Wed, 13 Oct 2004, Anish Kumar K. wrote:

 I wrote a program which will replace all the hardcoded things to some 
 values specific to one client. for example designed a template with 
 body bgcolor=%bg_color%?.

Are you using a template package like HTML::Template, Template Toolkit, 
or Mason?

If not, why not?

This is a solved problem. 

If you use the existing libraries, you shouldn't have to deal with 
problems like this, and you can focus on what you really want to 
accomplish with your programs.


One way or another, it is impossible for anyone here to help you without 
seeing the code you're using, and you have shown none. However, if the 
code is using some kind of hand-rolled template system, the obvious fix 
is to switch to one of the standard ones. They're easy to use, they can 
be very flexible (especially, in different ways, TT and Mason), and 
using them is a hell of a lot better than doing this from scratch! :-)

 

-- 
Chris Devers

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response