You will need to the following:
1) Copy the following variables in the
Links.pm file:
Code:
$LINKS{build_detail_path} = "$LINKS{build_root_path}/Detailed";
$LINKS{build_detail_url} = "$LINKS{build_root_url}/Detailed"; and rename the
Detailed to something else like
Book_Reviews. And also replace the variable names with something like:
Code:
$LINKS{build_bookreview_path}
$LINKS{build_bookreview_url} 2) Copy the
sub build_detailed_view routine in the
nph-build.cgi and rename the new subroutines something like
sub build_bookreviews_view. In these new subroutines, replace the following variables:
Code:
$LINKS{build_detail_path}
$LINKS{build_detail_url}[/red]
with the following variables:
Code:
$LINKS{build_bookreviews_path}
$LINKS{build_bookreviews_url} 3) Create the directores you are calling in the
links/pages directory and change their permission to
777 (drwxrwxrwx).
Example:
links/pages/
Book_Reviews 4) Re-build your directory.
OR if you want to use dynamic detailed pages via the
detail.cgi Mod located in the
Resource Center, you could simply do the following:
1) In the
sub site_html_detailed routine in the
HTML_Templates.pm file, add the following conditional statements:
Code:
if ($in->param('tmp') eq '1') {
$template = "bookreviews.html";
}
elsif ($in->param('tmp') eq '2') {
$template = "musicreviews.html";
}
else {
$template = "detailed.html";
} 2) Then replace the following codes in that sub:
Code:
my $output = &load_template ('link_detail.html', { with the following codes:
Code:
my $output = &load_template ($template, { 3) Then to call the appropriate detailed template, use the following link codes in your
link.html file:
Code:
<a href="<%build_detail_url%>?ID=<%ID%>&tmp=1">Book Reviews</a>
<a href="<%build_detail_url%>?ID=<%ID%>&tmp=2">Book Reviews</a> Of course, you may have to add another field in your
Links table that specifies whether the link is a book or music (via ENUM field type).
Then you could add the following codes in your
link.html file:
Code:
<%if Type eq 'Book'%>
<a href="<%build_detail_url%>?ID=<%ID%>&tmp=1">Book Review</a>
<%endif%>
<%if Type eq 'Music'%>
<a href="<%build_detail_url%>?ID=<%ID%>&tmp=2">Music Review</a>
<%endif%> Regards,
Eliot Lee