Gossamer Forum
Home : Products : Links 2.0 : Customization :

Eliot:Please help me with subcategory style

Quote Reply
Eliot:Please help me with subcategory style
I want different style of subcategorys based on the name of the category.
Example:
The categories in the homepage are in two colums and I have Category Domain which has 10 subcategories.When I click at Domain than the subcategories should show in 3 colums.
The subcategories of Domain2 should show only in two colums.

At nph-build.cgi:

# Store all the category html info in $category.
if ($#{$subcategories{$cat}} >= 0) {
$category = &site_html_print_cat (@{$subcategories{$cat}});
}
else {
$category = "";
}

At my last post you have solve the problem:
Categories in home page and subcategories have a different style with just rename &site_html_print_cat with &site_html_print_subcat
and
adding sub site_html_subcat in site_html_templates.pl

Now:
How can I say
if category=a than $category = &site_html_print_subcat1(@{$subcategories{$cat}});

if category=b than $category = &site_html_print_subcatcat2(@{$subcategories{$cat}});
at
nph-build.cgi
# Store all the category html info in $category.
if ($#{$subcategories{$cat}} >= 0) {
$category = &site_html_print_cat (@{$subcategories{$cat}});
}
else {
$category = "";
}