Rob Tanner wrote:
> 
> --On 07/16/00 16:11:07 -0400 Sam Carleton <[EMAIL PROTECTED]> wrote:
> 
> > I would like perl to process a php page before or after the php
> > interpreter get's it hands on the file.  I am trying to add a navbar to
> > the PHP code.  How would I go about doing that?
> >
> > Sam
> 
> The simple answer is wait for Apache 2.x, but since that's just barely
> alpha now, that's a looong [sic] while away.
> 
> The issue in Apache 1.x is that you can use only one handler in any
> particular phase to process you're request.  Thus, php or mod_perl (or cgi,
> depending on how you meant to invoke perl).
> 
> But the real question is why?  I have never done a navbar on a page (most
> of my web work is server app development, not pages), si I may be making
> some wrong assumptions here.  If you are creating the page with a cgi or a
> mod-perl app, I would think you would be able to do the whole thing without
> ever using PHP.
> 
> But, if what you are really doing is displaying a page with server-side
> components, PHP is a much better chice by far than cgi or mod-perl.  What
> are you trying to do that php won't do for you?

I was reading the O'Reilly book "Writting Apache Modules in Perl and C"
and discovered the navbar example.  I really like how Stein/MacEachern
designed the navbar code.  Once the code was written, it read in a
configuration file so that it would know the url/name of all items on
the navbar.  This config file was passed to the navar code via variable
in the apache directive.  I put the navbar code into the essi example
(enhansted server side include) so that one would only need to the
correct comment <!--#NAVBAR--> in the html file.

I think this is a great idea.  If I could get the navbar/essi code to
parse the php page either before or after php processed the page, the
navbar would always be there.

The bottom line:  I would like to have some navigation code that is
totally seperate from everything so that I don't have to worry about
broken links and stuff like that.  I also want the ability to change the
look/feel of the navigation without affecting everything. 

sam

Reply via email to