Gossamer Forum
Home : Products : Links 2.0 : Customization :

using another template for Cool.html

Quote Reply
using another template for Cool.html
Hello,

I want to use another template for my cool/top rated page. I need a template without the description and 'rate it'-text. This could be done when you remove the tags in link.html, but I want to keep them in the rest of the site. So I only want to change the template for cool and top rated. I hope someone could help me with this problem. If something is not completely clear please mail me asap: r.m.a.floris@kub.nl

thankx

Puffy Dog

Puffy Dog
------------------------
watch out this dog bites
Quote Reply
Re: using another template for Cool.html In reply to
In site_html_templates.pl, make a copy of sub site_html_link, like the following:
Code:
sub site_html_link_cool {
# --------------------------------------------------------
# This routine is used to display what a link should look
# like.

my %rec = @_;

# Set new and pop to either 1 or 0 for templates.
($rec{'isNew'} eq 'Yes') ? ($rec{'isNew'} = 1) : (delete $rec{'isNew'});
($rec{'isPopular'} eq 'Yes') ? ($rec{'isPopular'} = 1) : (delete $rec{'isPopular'});

return &load_template ('link_cool.html', {
detailed_url => "$db_detailed_url/$rec{'ID'}$build_extension",
%rec,
%globals
});
}
In nph-build.cgi, sub build_cool_page, change the following:
Code:
$link_output{$category} .= &site_html_link (%tmp) . "\n";
to:
Code:
$link_output{$category} .= &site_html_link_cool (%tmp) . "\n";
Note the bolded text. Create a new link template named link_cool.html. The top rated page does not use the link.html template. In sub build_ratings_page, edit the HTML codes in the variables $top_votes and $top_rated.

--Drew