I always prefer using templates (actually HTML::Template like Scot
mentioned), but it won't make you pages dynamic, each page would need to be
accessed through a script.  You could though use HTML::Template to create
templates on your "dev" server (which would be your own PC, and then write a
script to read through the templates and generate static HTMl files).

I also use the substitution and relace quite a bit as well, and you would
probably want to use that to convert the HTML files to templates anyway (if
that is the way you wanted to go), especially if you have a ton of files to
convert.

And if you do decide to use HTML::Template, it is horribly simple and will
do most everything you might need.  You can insert data anywhere, even
inside a tag.  ...But then again, you should be able to do that with server
side includes as well.

So I would start by writing the substitution script, you will need it anyway
unless you want to edit them all by hand.  Then decide on if you will
replace the current JavaScript with includes, or with the new JavaScript (I
suggest Includes).

Take a look at the docs for HTML::Template, it's very easy.
http://www.perldoc.com/perl5.6.1/lib/HTML/Template.html

Rob

-----Original Message-----
From: Rashid Faraby [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 06, 2002 10:50 AM
To: [EMAIL PROTECTED]
Subject: Text block switching or HTML Templating


Dear Friends,

I am faced with a dilemma related to a website I am in the process of 
redesigning.  I have a number of pages which have extensive javascript to 
control my drop-down menues.  The thing is I have modified this section 
after creating all the pages for the site because I added more pages.  
Now, instead of going to each page to change my headers, what would you 
advise to achieve this dynamically.  Options I am considering:
a. Reading all the files in the HTML directory and making the changes 
using regular expressions (like /text beginning/../text end/ to capture 
the old code and replace with the new code).
b.  Using HTML templating (which I've never used before!)
I tried using server side includes directives but my code goes beyond 
contents in the body tag (everything in between the <head> ... </head> 
tag and some code in the body tag!)  Poor design I guess!  My Internet 
provider refuses to install mod_perl or any of the magical tools for 
dynamic HTML generation on their server.  
Anybody has encountered a problem like this?  Any advice, leads will be 
very much appreciated.

Rashid
_______________________________________________________



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to