I have a page named Main.cgi where in I have a horizontal menu bar with UserList logs and so on like the Menu above Questions Tags Users etc. Whenever I click the Userlist I get navigated to another page where I have a grid. In this page also I want that Menu bar which was in Main.cgi, and so on. It should get repeated to every page.
+1
A:
You probably want to make the code that created the menu bar into a function in a module that you can load from every CGI program on your web site.
But really, you should be looking at using a templating system to produce all of the HTML for your system.
davorg
2010-09-14 06:17:49
In http://tt2.org/ whenever i click the link of "download the template toolkit version" then a page is getting displayed with OBJECT NOT FOUND message..error 404..and i have active perl installed..they have mentioned something like strawberry perl..how is active perl different from strawberry..am i supossed to install strawberry perl also?...
sonya
2010-09-14 11:38:00
Hmm, yes that link is broken, I assume you've reported it to the webmaster. Strawberry Perl is "Active Perl Plus". It's now the recommended Perl version for Windows. I recommend that you install that and then get the Template Toolkit from CPAN (http://search.cpan.org/dist/Template-Toolkit/).
davorg
2010-09-14 12:56:41
The syntax of cpan and template toolkit seems completly diferent from what i have been using...i need to start from the scratch again now? Please reply sir...and now am executing all my cgi programs in perl express and am working on windows paltform,,,, sir am completely confused about CPAN, Template Toolkit , perl express...Can you please guide me what to do and how?? Please sir..
sonya
2010-09-14 13:26:48
Yes, it's certainly different. But getting the HTML out of your Perl code will make your programs far easy to write (and to maintain). I wrote a series of articles about CGI that might help (the last one introduces TT). See http://mag-sol.com/articles/cgi1.html, http://mag-sol.com/articles/cgi2.html and http://mag-sol.com/articles/cgi3.html.
davorg
2010-09-14 14:17:38
jene, you also want to keep the logic in your templates **very** simple. Never program in your templates, only present your data.
daotoad
2010-09-15 15:50:15