Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

HTML::Template and frames

by awkmonk (Monk)
on Apr 08, 2003 at 09:51 UTC ( #248869=perlquestion: print w/replies, xml ) Need Help??
awkmonk has asked for the wisdom of the Perl Monks concerning the following question:

Fellow monks,

This is more of a 'how do the rest of you do it?' type of question.

My current CGI script has a fair amount of hard coded HTML, which I wish to separate out and use HTML::Template.

I have multiple processes running, updating 'status' files. I control the starting/stopping of these via a CGI web page. I have to display the current status of these processes (up to 200) refreshing about every 10 seconds.

The problem is that I'm also using frames. Will I need to set up several templates for the frames and their respective contents, or is there a better way to present the dynamic content (LAYER's perhaps? or HTML::Application?).

perldoc Template didn't give much of a clue, and I couldn't find much in Super Search or on Google (apart from references to JavaScript and DHTML).

Thanks for putting up with me.

'I think the problem lies in the fact that your data doesn't fit my program'.

Replies are listed 'Best First'.
Re: HTML::Template and frames
by benn (Vicar) on Apr 08, 2003 at 13:04 UTC
    You'll often need multiple templates anyway, irrespective of whether you use frames or not - its generally a lot cleaner to have a bunch of small templates that you put together (header, footer etc) than use a big HTML::Template with lots of 'if's etc. - nicer on your HTML people too :)

    Generally in this situation, where there are multiple frames updating at different times, I prefer to use a single script/Template combination for each frame - main.cgi, menu.cgi, info-frame.cgi etc.
    One thing you might consider is <iframe>, which is pretty well supported now and can clean up your layout considerably - much nicer than using DHTML (which should never be implemented using *shudder* 'LAYER' btw - but that's a whole other can-o-worms...).


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://248869]
Approved by Thelonius
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2018-01-16 19:44 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (188 votes). Check out past polls.