--On 07/22/00 15:56:18 -0400 Sam Carleton <[EMAIL PROTECTED]> wrote:

>
> 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.
>

Okay, now I understand what you're after.  However, the way you want to do 
it isn't supported in Apache 1.x unless you want to do some convoluted 
saving of the page on disk first and then doing an internal redirect from 
within mod-perl.  Simply stated, in Apache 1.x you can have only one 
handler for the response phase.  That limitation won't go away until 2.x. 
One thing you might try is putting it in FIXUP phase.  I don't think that's 
really the right place for what is really a response phase modification of 
the page, but on the other hand, I don't know that it won't work either -- 
you'll simply have to experiment.  I'm assuming you want to add the navbar 
to all your pages, both those built dynamically with PHP and also static 
pages that are simply served by apache without PHP getting in the loop. 
If, however, all your pages (or at least all those you'd like to add ther 
navbar to) are PHP pages, why not simply add a PHP include tag.  Files read 
in via an include my contain PHP tags, and that way you could simply write 
the navbar code in PHP.  Mind you, I'm not trying to say you shouldn't 
under any circumstances try and mix mod-perl and PHP.  Rather, I am 
suggesting that if the hoops you have to jump through get too convoluted, 
maintenance will become a bear.

-- Rob



       _ _ _ _           _    _ _ _ _ _
      /\_\_\_\_\        /\_\ /\_\_\_\_\_\
     /\/_/_/_/_/       /\/_/ \/_/_/_/_/_/  QUIDQUID LATINE DICTUM SIT,
    /\/_/__\/_/ __    /\/_/    /\/_/          PROFUNDUM VIDITUR
   /\/_/_/_/_/ /\_\  /\/_/    /\/_/
  /\/_/ \/_/  /\/_/_/\/_/    /\/_/         (Whatever is said in Latin
  \/_/  \/_/  \/_/_/_/_/     \/_/              appears profound)

  Rob Tanner
  McMinnville, Oregon
  [EMAIL PROTECTED]

Reply via email to