Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: calling menu bar creating code from another cgi/pl code

by DanielSpaniel (Scribe)
on Aug 27, 2013 at 01:21 UTC ( [id://1051041]=note: print w/replies, xml ) Need Help??


in reply to calling menu bar creating code from another cgi/pl code

Yes, you could put the menu-bar code in a separate file and call it whenever required; you could also read it from a database if you wanted to.

If you're not already familiar with the idea, then you may also find it useful to read a little about Server Side Includes (SSI). I don't know what type of Web server you are using, but I think the principle is common to most servers.

Apologies if I'm telling you something you already know, but, in a nutshell, SSI allows you to put special tags into your html pages, and the server will execute the commands; some may be as simple as printing the date, but (so long as your server is configured for it) you can also execute Perl scripts, or whatever, which might then produce a menu, or footer, etc. It's a very common thing to do.

There are lots of web sites out there with information about Server Side Includes, but I've provided a couple below:

http://www.crucialp.com/resources/tutorials/web-programming/server-side-includes-ssi-tutorial.php

http://httpd.apache.org/docs/current/howto/ssi.html

  • Comment on Re: calling menu bar creating code from another cgi/pl code

Replies are listed 'Best First'.
Re^2: calling menu bar creating code from another cgi/pl code
by msinfo (Sexton) on Aug 27, 2013 at 06:33 UTC

    thanks daniel,

    i had little idea about SSI, but some where i read, it produces some security issues, so never went that way, but it seems, if used properly, it could provide, some useful informations and functions, for which one does not have to write long statement.

    is there some kind of system at perlmonk, to mark questions, as solved, or to accept reply, as answer. i had been searching for such links, but could not find one

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1051041]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (3)
As of 2024-04-19 22:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found