This is a multi-part message in MIME format.

------_=_NextPart_001_01C6A4F0.FFFACF32
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Morning All,
=20
What I have below works, but for some reason I'm not all that =
comfortable with it.. Could someone tell me if I'm doing anything evil =
with my approach??
=20
MP2 (ParseNav.pm) Script Description:
Needed a script to create page navigation, the nav needs to be called =
within other MP2 scripts as well as in standard static pages (via ssi)
=20
When I want the nav within another MP2 script, I simply...
=20
my $top_nav =3D SCRIPTS::ParseNav->cgi_nav($r);
=20
When I want the nav in a static HTML page, I simply..
=20

=20
Below is the basic ParseNav script - TIA for any help or advise..
-Chris
=20
################################################## ##################packa=
ge SCRIPTS::ParseNav;


use strict;
use vars qw($r);

###### Set some Constants
# Template Path
$ENV{'HTML_TEMPLATE_ROOT'} =3D xxx";
# Our Content Template
my $content =3D "Navigation.tmpl";

################################################## ####################
# Main
# Our Mod_Perl Content Handler
sub handler {
$r =3D shift;

&cgi_nav();

# As this is being called from a include, set a header and print it out
$r->send_http_header;
print $content->output;=20
=20
# Return our header as we are done!!!
return Apache::OK;
=20
} # End of Sub
################################################## ####################
sub cgi_nav {
my ($self,$r) =3D @_;

# do what we want to do and return the content template to the =
requesting MP2 script

return $content;

}


=20

=20
=20
=20
=20
=20
=20
=20

------_=_NextPart_001_01C6A4F0.FFFACF32
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

DIR=3Dltr> charset=3Diso-8859-1">
color=3D#000000 size=3D2>Morning All,
=0A=
 
=0A=
What I have below works, but for some =
reason I'm =0A=
not all that comfortable with it.. Could someone tell me if I'm doing =
anything =0A=
evil with my approach??
=0A=
 
=0A=
MP2 (ParseNav.pm) Script =
Description:
=0A=
Needed a script to create page =
navigation, the nav =0A=
needs to be called within other MP2 scripts as well as in standard =
static pages =0A=
(via ssi)
=0A=
 
=0A=
When I want the nav within another MP2 =
script, I =0A=
simply...
=0A=
 
=0A=
 my $top_nav =3D SCRIPTS::ParseNav->cgi_nav($r);
=0A=
 
=0A=
When I want the nav in a static HTML page, I simply..
=0A=
 
=0A=
<!--#include virtual=3D"/parsenav" -->
=0A=
 
=0A=
Below is the basic ParseNav script - TIA for any help or =
advise..
=0A=
-Chris
=0A=
 
=0A=
################################################## ##################=
package =0A=
SCRIPTS::ParseNav;
=0A=

use strict;
use vars qw($r);

=0A=

###### Set some Constants
# Template =
Path
$ENV{'HTML_TEMPLATE_ROOT'} =3D =0A=
xxx";
# Our Content Template
my $content =3D "Navigation.tmpl";

=0A=

################################################## ####################=

# =0A=
Main
# Our Mod_Perl Content Handler
sub handler {
 $r =3D =
shift;

=0A=

 &cgi_nav();

=0A=

 # As this is being called from a include, set a header and =
print it =0A=
out
 $r->send_http_header;
 print =0A=
$content->output; 
 
 # Return our =
header as we are =0A=
done!!!
 return Apache::OK;
 
} # End of =0A=
Sub
################################################## ################=
####
sub =0A=
cgi_nav {
 my ($self,$r) =3D @_;

=0A=

# do what we want to do and return the content template to the =
requesting MP2 =0A=
script

=0A=

return $content;

=0A=

}

=0A=


 

=0A=
 
=0A=
 
=0A=
 
=0A=
 
=0A=
 
=0A=
 
=0A=
 

------_=_NextPart_001_01C6A4F0.FFFACF32--