Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Re: [Alex] Possible bug in Category Template

Quote Reply
Re: [Alex] Possible bug in Category Template In reply to
Alex,

As I explained a couple of postings above - that doesn't work Frown

There must be something else I need to do, I was hoping you would know Unsure

JeffB.

My sub_template now looks like this...


Code:
sub template_set {
# -------------------------------------------------------------------
# Return the value of template set to use for a given category.
#
my $self = shift;
my $id = shift or return $self->error ('BADARGS', 'FATAL', "Must pass category id to template_set");
return '' unless (exists $self->{schema}->{cols}->{Category_Template});

return $self->{_template_cache}->{$id} if (exists $self->{_template_cache}->{$id});

# If this category has a template set, use it.
my ($cat_info) = $self->select ( ['Category_Template'], { ID => $id })->fetchrow_array;

# Otherwise look at it's parents.
# unless ($cat_info) {
# my $parents = $self->parents ($id);
# foreach my $parent (@$parents) {
# ($cat_info) = $self->select ( ['Category_Template'], { ID => $parent })->fetchrow_array;
# if ($cat_info) {
# last;
# }
# }
# }
$self->{_template_cache}->{$id} = $cat_info || '';
return $self->{_template_cache}->{$id};
}


JeffB
GT customer for 6 years (and counting!)

Last edited by:

jeffb: May 12, 2002, 4:58 PM
Subject Author Views Date
Thread Possible bug in Category Template jeffb 4780 Aug 22, 2001, 5:18 PM
Thread Re: Possible bug in Category Template
Alex 4747 Aug 22, 2001, 5:28 PM
Thread Re: Possible bug in Category Template
jeffb 4735 Aug 23, 2001, 10:00 AM
Thread Re: Possible bug in Category Template
Alex 4719 Aug 23, 2001, 11:33 AM
Post Re: Possible bug in Category Template
jeffb 4718 Aug 23, 2001, 11:50 AM
Thread Re: [Alex] Possible bug in Category Template
jeffb 4606 May 1, 2002, 7:18 AM
Post Post deleted by Paul
Paul 4617 May 1, 2002, 7:40 AM
Thread Re: [Alex] Possible bug in Category Template
webmaster33 4614 May 2, 2002, 4:58 AM
Thread Re: [webmaster33] Possible bug in Category Template
jeffb 4600 May 7, 2002, 1:07 AM
Thread Re: [jeffb] Possible bug in Category Template
Alex 4546 May 11, 2002, 9:42 AM
Thread Re: [Alex] Possible bug in Category Template
jeffb 4535 May 12, 2002, 4:56 PM
Thread Re: [jeffb] Possible bug in Category Template
Alex 4531 May 14, 2002, 5:07 PM
Thread Re: [Alex] Possible bug in Category Template
jeffb 4549 May 14, 2002, 5:46 PM
Post Re: [jeffb] Possible bug in Category Template
Alex 4521 May 14, 2002, 6:02 PM
Thread Re: [Alex] Possible bug in Category Template
SeanP 4490 May 14, 2002, 8:58 PM
Post Re: [SeanP] Possible bug in Category Template
jeffb 4506 May 15, 2002, 5:23 PM