As my first contribution :-), these are very easy instructions to simply modify LinksSQL to use a different template for each category.
1) You need to add a field to the Category table (Table Maintenance section in the Links Manager). I called it Template2. Make sure you set the default value field to category.html.
2) Open nph-build.cgi (in admin directory) and in # Get the category info., add the following line:
So that it ends up reading:
%OUT = (); # Start with a clean hash.
$OUT{category_id} = $category_r->{'ID'};
$OUT{category_name} = $category_r->{'Name'};
$OUT{header} = $category_r->{'Header'};
$OUT{footer} = $category_r->{'Footer'};
$OUT{meta_name} = $category_r->{'Meta_Description'};
$OUT{meta_keywords} = $category_r->{'Meta_Keywords'};
$OUT{description} = $category_r->{'Description'};
$OUT{template2} = $category_r->{'Template2'};
$OUT{random} = rand (10000);
$OUT{random1} = rand (10000);
$OUT{random2} = rand (10000);
$OUT{random3} = rand (10000);3) Open HTML_Templates.pm (in admin/Links directory) and in sub site_html_category, replace this:
For this:
After all this is done, simply make copies of category.html in your templates folder and name them according to each category and modify as you wish.
Be sure to set the contents of the field "Template2" when creating or modifying a category to the name of the template (ie. instead of category.html, category_name1.html or whatever you named it).
Good luck!
1) You need to add a field to the Category table (Table Maintenance section in the Links Manager). I called it Template2. Make sure you set the default value field to category.html.
2) Open nph-build.cgi (in admin directory) and in # Get the category info., add the following line:
Code:
$OUT{template2} = $category_r->{'Template2'};Code:
# Get the category info. %OUT = (); # Start with a clean hash.
$OUT{category_id} = $category_r->{'ID'};
$OUT{category_name} = $category_r->{'Name'};
$OUT{header} = $category_r->{'Header'};
$OUT{footer} = $category_r->{'Footer'};
$OUT{meta_name} = $category_r->{'Meta_Description'};
$OUT{meta_keywords} = $category_r->{'Meta_Keywords'};
$OUT{description} = $category_r->{'Description'};
$OUT{template2} = $category_r->{'Template2'};
$OUT{random} = rand (10000);
$OUT{random1} = rand (10000);
$OUT{random2} = rand (10000);
$OUT{random3} = rand (10000);
Code:
my $output = &load_template ( 'category.html', {Code:
my $output = &load_template ( $tags->{'Template2'}, {Be sure to set the contents of the field "Template2" when creating or modifying a category to the name of the template (ie. instead of category.html, category_name1.html or whatever you named it).
Good luck!