Gossamer Forum
Skip to Content


Home : Plugins Support - Paid : General Discussions :

2007 Template Plug In

Quote Reply
2007 Template Plug In
Okay, I posted in the wrong place before. Sorry.

I thought I had this problem solved but I do not.

I have the 2007 template, which I love. But the only thing is that the Main Categories will NOT link correctly if there is more than one word in the Category. It does not insert the _ between the words in the category the way it does in the main page. The only Main Categories that successfully link in the LEFT menu bar are the ones that only have one word.

http://www.antiquetractorsonline.com/

Above is a link to my site so you can see.

If you click in the left menu to a category that has more than one word, it sends you back to the home page as it is not finding the category page. Now click in the main page and you will see the _ between the words in the URL bar. It links correctly.

How can I correct this? It is the very last step to my installation and I really want that menu bar.

Thank you!

Kate
Quote Reply
Re: [katesmalley] 2007 Template Plug In In reply to
Hi,

Sorry about the forum issues - I wasn't aware it was broken. I've now fixed it up, so you should be able to reply ok now Wink

For your issue - can you go into Build > Template Globals, and find the one called "get_root_cats". Replace the contents with the below global:


Code
sub { 

my $category_id = $_[0];

my $tbl = $DB->table('Category');
$tbl->select_options('ORDER BY Name');
my $sth = $tbl->select ( { FatherID => 0 } ) || die $GT::SQL::error;

my @loop;
while (my $hit = $sth->fetchrow_hashref) {
$hit->{URL} = $CFG->{build_root_url} . "/". $tbl->as_url( $hit->{Full_Name} ) . "/index.html";
if ($hit->{ID} eq $category_id) { $hit->{selected} = "yes" }
push @loop, $hit;
}

return { side_category_loop => \@loop }

}


That should fix up your problem Smile

Cheers
Andy
Programmer/Designer/LinksSQL Freak Cool

http://www.ultranerds.com
http://www.imagesql.com