Perl-Sensitive Sunglasses | |
PerlMonks |
Re: CGI within your layoutby cfreak (Chaplain) |
on Jan 17, 2005 at 19:39 UTC ( [id://422812]=note: print w/replies, xml ) | Need Help?? |
Well as others have stated using some kind of SSI parser within CGI would probably get you where you're going, however I don't feel this is the best way. In my opinion the best way is to turn your logic around. Instead of trying to include your CGIs in a layout, include your layout in your CGIs with a templating system such as HTML::Template. Tanktalus seems to be doing that in his example, though I would use the templating engine's logic rather than his method of including certain things. If you need to keep your links the same (since in my method you would call a CGI script directly rather than an HTML file) I would simply use the URL rewritting features of Apache to get people to the correct link. HTH
In Section
Seekers of Perl Wisdom
|
|