Gossamer Forum
Home : Products : Links 2.0 : Customization :

Multiple Category Templates Problem

Quote Reply
Multiple Category Templates Problem
Hi Everyone!
I tried to install Bob Connors mod (Multiple Category Templates With Links v2.0) and when I built the site into the admin control panel (Build All) everything seemed to work fine.
When I checked the categories, I saw that Links 2 didn't use the new templates I designed for each category.

I try to paste you how I modified the site_html_templates.pl according the tutorial published by Bob on his mod (you could find it here):

1) In site_html_templates pl, sub site_html_category I added:
my $template;
# Set the appropriate template file to load
if ($category_name =~ /^Amateurs/) {
$template = "cat1.html"; }
elsif ($category_name =~ /^Babes/) {
$template = "cat2.html"; }
elsif ($category_name =~ /^Ebony/) {
$template = "cat3.html"; }
elsif ($category_name =~ /^Latina/) {
$template = "cat4.html"; }
elsif ($category_name =~ /^Mature/) {
$template = "cat5.html"; }
elsif ($category_name =~ /^Asian/) {
$template = "cat6.html"; }
elsif ($category_name =~ /^Teens/) {
$template = "cat7.html"; }
else { $template = "category.html"; }

2) I modified:
return &load_template ( 'category.html', {
with
return &load_template ( $template, {

The script still builds each category using the default category.html and even if I deleted it from the directory Links still perstist in it's using.
What am I doing wrong ?

thanks in advance for any reply and please excuse my poor english.
Quote Reply
Re: [willsmit] Multiple Category Templates Problem In reply to
I also noticed that Links 2 uses my specific category templates only partially.
I see the design background or logo and some more elements but something is missing:
for example: in the templates I designed I wrote texts that do not appear in the site after the Build All process (for each category template I put a number in order to try the mod and see if Links creats effectively different categories using different templates).

thanks again
Francesco
Quote Reply
Re: [willsmit] Multiple Category Templates Problem In reply to
Are the category names you used in the mod some of your top-level categories? If they are subcats, you need to re-read the instructions, and make sure you entered the names correctly. Without seeing your site, it is hard to troubleshoot...


Leonard
aka PerlFlunkie
Quote Reply
Re: [willsmit] Multiple Category Templates Problem In reply to
In Reply To:
if ($category_name =~ /^Amateurs/) {
$template = "cat1.html"; }
elsif ($category_name =~ /^Babes/) {
$template = "cat2.html"; }
elsif ($category_name =~ /^Ebony/) {
$template = "cat3.html"; }
elsif ($category_name =~ /^Latina/) {
$template = "cat4.html"; }
elsif ($category_name =~ /^Mature/) {
$template = "cat5.html"; }
elsif ($category_name =~ /^Asian/) {
$template = "cat6.html"; }
elsif ($category_name =~ /^Teens/) {
$template = "cat7.html"; }

I see the problem you are having. Frown