Unless you need special processing, such as link.html (to do the yes/no, dates, etc) or category, where you have to do translations on the ID's, you can just pass the template name to the display routine. You don't need to edit the Site_HTML.pm file at all!
print $IN->header();
print Links::SiteHTML::display ('template', $hash_reference);
If it just uses the standard links variables, and template globals, you don't even need a full routine. You can just add something like:
sub _build_added_page {
# ------------------------------------------------------------------
# Generate the added page.
#
_time_start();
my $page = $CFG->{build_root_path} . "/" . 'added.page.html';
$USE_HTML ?
print "Building <a href='$CFG->{build_root_url}/added.page.html' target='_blank'>Added Page</a> ... \n" :
print "Building Added Page ... \n";
open (ADDED, "> $page") or _cant_open($page, $!);
print ADDED Links::SiteHTML::display ('added_page', $hash_reference);
close ADDED;
my $perms = oct ($CFG->{build_file_per});
chmod ($perms, $page);
print "Done (", _time_display(), " s)\n\n";
}
To the nph-build.cgi file, with a call to it:
&_build_added_page();
in the build_staggered and build_all routines.
You don't need to use the plugin format, since nothing is going to try to hook into the call to this routine, and it uses the 'display' hook, so anything done to displayed templates will be done to it.
Rather than do this, you can use page.cgi to do this, by passing in the template you wish to display by the p= parameters.
If you have a template page "information.html" you would call it:
../page.cgi?p=information
The only parameter used by page.cgi is the p= and once passed to the display routine, the t= (template set) is also examined.
So, it's a lot simpler than trying to edit the code and create static pages <G>
PUGDOG® Enterprises, Inc.
FAQ:
http://LinkSQL.com/FAQ Forum:
http://LinkSQL.com/forum