Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

template for category

Quote Reply
template for category
some one know how define one template for every category
on the Linksql.

this is the code.

sub site_html_category {
# --------------------------------------------------------
# This rountine will build a page based for the current category.
#
my ($tags, $dynamic) = @_;
my $template = defined $dynamic ? $dynamic->param('t') : undef;
(ref $tags eq 'HASH') or croak "HTML_TEMPLATES: Argument '$tags' must be hash reference";

my ($name) = $tags->{'category_name'} =~ m,/?([^/]+)$,;
defined $dynamic and &load_user ($dynamic, $tags);
my $output = &load_template ( 'category.html', {
%$tags,
build_links_per_page => $LINKS{build_links_per_page},
category_first => $name,
%GLOBALS
}, undef, $template );
defined $dynamic and &clean_output($dynamic, \$output);
return $output;
}



Quote Reply
Re: template for category In reply to
I don't understand your request...category.html _is used for every category in your directory.

Regards,

Eliot Lee

Quote Reply
Re: template for category In reply to
for ejemple
make a diferent template for every category
one directori call bussnes, i wont make one template for this category,
and when make the build, dis directory uses de bussnes.html template or other one, and not the category.html

Quote Reply
Re: template for category In reply to
Please read the FAQs located in pugdog's LINKS SQL FAQ site. It is linked in the Resource Center in the Links SQL: FAQ section. There are about two FAQs that address your question and if you search this forum for Multiple Category Templates, you will find threads where this issue is discussed!

Regards,

Eliot Lee