Hi,
Im was trying to think of a way to have the new links for the day displayed on the main page.
I managed to do that through SSI . where i managed to get links to creat an additional page for the new links but with a different template so it would be the one included in the main page .
its working , and i still have the original new links pages with their own template.
but this means i will have two pages generated for each day , while i can do with one becasue i dont need the rest after the nest update.
detailes of what i did :
in site_html_templates.pl :
under sub site_html_new
i added a new sub :
sub site_html_new2 {
# --------------------------------------------------------
# This routine will build a what's new page.
return &load_template ('new2.html', {
total => $total,
grand_total => $grand_total,
link_results => $link_results,
title_linked => $title_linked,
%globals
} );
}
in : nph-build.pl
in : sub build_new_pag
under :
# Crete the new page, and do a bit of HTML work for the main page.
if ($build_span_pages) {
open (NEW, ">$build_new_path/$date$build_extension") or cgierr ("unable to open what's new page: $build_new_path/$build_index. Reason: $!");
$use_html ?
print qq|\tNew Links for <a href="$build_new_url/$date$build_extension" TARGET="_blank">$date</a>: $total\n| :
print qq|\tNew Links for $date: $total\n|;
print NEW &site_html_new;
close NEW;
i added :
open (NEW2, ">$build_new_path/$date.html") or cgierr ("unable to open what's new page: $build_new_path/$build_index. Reason: $!");
$use_html ?
print qq|\tNew2 Links for <a href="$build_new_url/$date$build_extension" TARGET="_blank">$date</a>: $total\n| :
print qq|\tNew2 Links for $date: $total\n|;
print NEW2 &site_html_new2;
close NEW2;
so now i have a new page called &date.html (all my other extensions are .shtml)
this page can be called from the man page by usinmg :
<!--#include virtual="/bookshop/new/<%date%>.html"-->
and then just creat a new template , call it new2.html
i know there must be an easier way to do it .
what i nned to do now , is have only one page created for the new links of the day , using the new2.html template,
in order to save space.
even better would be to have them placed in the main page by nph-build.pl
if anyone knows a better solution, please tell me .
Thank you ,
Im was trying to think of a way to have the new links for the day displayed on the main page.
I managed to do that through SSI . where i managed to get links to creat an additional page for the new links but with a different template so it would be the one included in the main page .
its working , and i still have the original new links pages with their own template.
but this means i will have two pages generated for each day , while i can do with one becasue i dont need the rest after the nest update.
detailes of what i did :
in site_html_templates.pl :
under sub site_html_new
i added a new sub :
sub site_html_new2 {
# --------------------------------------------------------
# This routine will build a what's new page.
return &load_template ('new2.html', {
total => $total,
grand_total => $grand_total,
link_results => $link_results,
title_linked => $title_linked,
%globals
} );
}
in : nph-build.pl
in : sub build_new_pag
under :
# Crete the new page, and do a bit of HTML work for the main page.
if ($build_span_pages) {
open (NEW, ">$build_new_path/$date$build_extension") or cgierr ("unable to open what's new page: $build_new_path/$build_index. Reason: $!");
$use_html ?
print qq|\tNew Links for <a href="$build_new_url/$date$build_extension" TARGET="_blank">$date</a>: $total\n| :
print qq|\tNew Links for $date: $total\n|;
print NEW &site_html_new;
close NEW;
i added :
open (NEW2, ">$build_new_path/$date.html") or cgierr ("unable to open what's new page: $build_new_path/$build_index. Reason: $!");
$use_html ?
print qq|\tNew2 Links for <a href="$build_new_url/$date$build_extension" TARGET="_blank">$date</a>: $total\n| :
print qq|\tNew2 Links for $date: $total\n|;
print NEW2 &site_html_new2;
close NEW2;
so now i have a new page called &date.html (all my other extensions are .shtml)
this page can be called from the man page by usinmg :
<!--#include virtual="/bookshop/new/<%date%>.html"-->
and then just creat a new template , call it new2.html
i know there must be an easier way to do it .
what i nned to do now , is have only one page created for the new links of the day , using the new2.html template,
in order to save space.
even better would be to have them placed in the main page by nph-build.pl
if anyone knows a better solution, please tell me .
Thank you ,