Gossamer Forum
Home : Products : Links 2.0 : Customization :

Newbie needs help please

Quote Reply
Newbie needs help please
   
Hello, my first time and post here. I have Links 2.0 installed and all is well except for the templates. I don't like all my categories to look like the same. I have a design to use all I want to do is add different links and adds on each category. So I guess I need to know the easiest way to change the templates? Sorry all new to link 2.0 and cgi all I know is html. Thanks in advance if anyone can help me!
Quote Reply
Re: [sue/fla] Newbie needs help please In reply to
Hi, sorry for that question! I did a search and found out the template mod. and I installed it in the place it told me to. While reading in the search I didn't find what else I need to do. This is what I put in the file site_html_templates.pl this is all I have done so far. So I need to change Category 1 to my first category right? Now my first category is Amateur and when I added it I named it Amateur.html. So would Amateur in the category_name then Amateur.html in the template line be what I have to change? I'm trying to take this step by step so I don't mess anything up. Do I have to change any thing anywhere else to make this work? Sorry I'm a true newbie thanks for your patience and help!


my $template;

# Set the appropriate template file to load
if ($category_name =~ /^Category1/) {
$template = "cat1.html"; }
elsif ($category_name =~ /^Category2/) {
$template = "cat2.html"; }
elsif ($category_name =~ /^Category3/) {
$template = "cat3.html"; }
else { $template = "category.html"; }

Quote Reply
Re: [sue/fla] Newbie needs help please In reply to
Change this:

if ($category_name =~ /^Category1/) {
$template = "cat1.html"; }


to read:

if ($category_name =~ /^Amateur/) {
$template = "Amateur.html"; }


You would do the same for each different template you want to use.

I hope this helps.
Quote Reply
Re: [Bobsie] Newbie needs help please In reply to
Thanks Bobsie, I put the code in like your directions said. But now it's saying fatal error and one of my categories is empty. Any idea on what I might be doing wrong? Thanks so much!
Quote Reply
Re: [sue/fla] Newbie needs help please In reply to
I would need to see the code you put in. Anyway you can send it to me for post it here? I would want to see the whole conditional statement.
Quote Reply
Re: [Bobsie] Newbie needs help please In reply to
Hey Bobsie, this is the code I put in and the Amateur and Anime categories are just a blank page now. When I hit build all it say error can't find category Amateur. Thanks!

# This rountine will build a page based for the current category.

my $template;
# Set the appropriate template file to load
if ($category_name =~ /^Amateur/) {
$template = "Amateur.html"; }
elsif ($category_name =~ /^Anal/) {
$template = "Anal.html"; }
elsif ($category_name =~ /^Anime/) {
$template = "Anime.html"; }
elsif ($category_name =~ /^Asian/) {
$template = "Asian.html"; }
elsif ($category_name =~ /^BBW/) {
$template = "BBW.html"; }
elsif ($category_name =~ /^Bisexual/) {
$template = "Bisexual.html"; }
elsif ($category_name =~ /^Boobs/) {
$template = "Boobs.html"; }
elsif ($category_name =~ /^Butts/) {
$template = "Butts.html"; }
else { $template = "category.html"; }

return &load_template ( $template, {