Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Multipe templates - subcategory problem

Quote Reply
Multipe templates - subcategory problem
Hi gang...
I'm using the multiple category templates mod but i cant get it to have a specific template for a SUBcategory. I tried having Subcategory and Category/Subcategory in the string and non of them work.
Any ideas?
Thanks in advance.
Quote Reply
Re: Multipe templates - subcategory problem In reply to
What exact codes are you using?

Regards,

------------------
Eliot Lee
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------











Quote Reply
Re: Multipe templates - subcategory problem In reply to
<pre>

my $template;
# Set the appropriate template file to load
if ($category_name =~ "Computacion") {
$template = "computacion.html"; }
elsif ($category_name =~ "Programacion") {
$template = "programacion.html"; }
elsif ($category_name =~ "Computacion/Software") {
$template = "software.html"; }
elsif ($category_name =~ "Redes") {
$template = "redes.html"; }
elsif ($category_name =~ "Hardware") {
$template = "hardware.html"; }
elsif ($category_name =~ "Sistemas_Operativos") {
$template = "soperativos.html"; }
elsif ($category_name =~ "Salud") {
$template = "salud.html"; }
else { $template = "category.html"; }

</pre>

Those are the codes i'm using.
"Computacion" and "Salud" are two categories (and it works for both), but the rest are all subcategories of the "Computacion" category, and they don't work. I try including and excluding the category with the /, but it still doesn't work.
Quote Reply
Re: Multipe templates - subcategory problem In reply to
Any suggestions please?
Quote Reply
Re: Multipe templates - subcategory problem In reply to
Found a Thread that will solve your problems...a bit more involved since you will have to add a new field to your category.def file, but easier to use in terms of sub-categories.

Go to the following Thread:


Regards,

------------------
Eliot Lee....
* Check Resource Center
* Search Forums

Quote Reply
Re: Multipe templates - subcategory problem In reply to
Thanks!
Quote Reply
Re: Multipe templates - subcategory problem In reply to
You're welcome.

Smile

Regards,

------------------
Eliot Lee....
* Check Resource Center
* Search Forums