Hello, thanx for reading. I have searched as crazy for postings
answering to my question therefore here i am.
I want to have the "detailed page" saved but with a specific name.
I have added a field: HOMEPAGEURL in the .def and this works fine.
I have tried to modify nph-build.cgi as follows, but without success:
sub build_detailed_view {
# ---------------------------------------------------
# This routine build a single page for every link.
#
my (@values, $homepageurl, %rec, $count);
if ($build_detail_path =~ m,^$build_root_path/(.*)$,) {
&build_dir ($1);
}
print "\t";
open (DB, "<$db_file_name") or &cgierr("unable to open database: $db_file_name. Reason: $!");
LINE: while (<DB> ) {
/^#/ and next LINE; # Skip comment Lines.
/^\s*$/ and next LINE; # Skip blank lines.
chomp;
@values = &split_decode ($_);
$homepageurl = $values[$homepageurl];
%rec = &array_to_hash (0, @values);
$title_linked = &build_linked_title ("$rec{'Category'}/$rec{'Title'}");
open (DETAIL, ">$build_detail_path/$rec{'HOMEPAGEURL'}$build_extension") or &cgierr ("Unable to build detail page: $build_detail_path/$rec{'HOMEPAGEURL'}build_extension. Reason: $!");
print DETAIL &site_html_detailed (%rec);
close DETAIL;
$use_html ?
print qq~<a href="$build_detail_url/$homepageurl$build_extension" target="_blank">$homepageurl</a> ~ :
print qq~$homepageurl ~;
(++$count % 10) or print "\n\t";
}
close DB;
print "\n";
}
What is wrong? Can you help? is it further possibile to create a "homepageurl"
directory with a standard index.html inside, instead of having /homepageurl.html?
Thanx indeed!!!
answering to my question therefore here i am.
I want to have the "detailed page" saved but with a specific name.
I have added a field: HOMEPAGEURL in the .def and this works fine.
I have tried to modify nph-build.cgi as follows, but without success:
sub build_detailed_view {
# ---------------------------------------------------
# This routine build a single page for every link.
#
my (@values, $homepageurl, %rec, $count);
if ($build_detail_path =~ m,^$build_root_path/(.*)$,) {
&build_dir ($1);
}
print "\t";
open (DB, "<$db_file_name") or &cgierr("unable to open database: $db_file_name. Reason: $!");
LINE: while (<DB> ) {
/^#/ and next LINE; # Skip comment Lines.
/^\s*$/ and next LINE; # Skip blank lines.
chomp;
@values = &split_decode ($_);
$homepageurl = $values[$homepageurl];
%rec = &array_to_hash (0, @values);
$title_linked = &build_linked_title ("$rec{'Category'}/$rec{'Title'}");
open (DETAIL, ">$build_detail_path/$rec{'HOMEPAGEURL'}$build_extension") or &cgierr ("Unable to build detail page: $build_detail_path/$rec{'HOMEPAGEURL'}build_extension. Reason: $!");
print DETAIL &site_html_detailed (%rec);
close DETAIL;
$use_html ?
print qq~<a href="$build_detail_url/$homepageurl$build_extension" target="_blank">$homepageurl</a> ~ :
print qq~$homepageurl ~;
(++$count % 10) or print "\n\t";
}
close DB;
print "\n";
}
What is wrong? Can you help? is it further possibile to create a "homepageurl"
directory with a standard index.html inside, instead of having /homepageurl.html?
Thanx indeed!!!