Arghhh... I have gone over the code a billion times with no luck. I am attempting to add a category field and have followed the directions previously posted in the forum. I want to add a linkcolor field that I can use to change the link color per category page. Here's what I have so far - perhaps it is just something simple I am missing.
category.def file:
%db_def = (
ID => [0, 'numer', 5, 8, 1, '', ''],
Name => [1, 'alpha', 40, 75, 1, '', '^[\w\d/_-]+$'],
Description => [2, 'alpha', '40x3', 500, 0, '', ''],
Related => [3, 'alpha', 0, 255, 0, '', ''],
'Meta Description' => [4, 'alpha', 40, 75, 0, '', ''],
'Meta Keywords' => [5, 'alpha', 40, 75, 0, '', ''],
Header => [6, 'alpha', 40, 75, 0, '', ''],
Footer => [7, 'alpha', 40, 75, 0, '', ''],
Linkcolor => [8, 'alpha', 40, 75, 0, '', '']
);
**********************************
in site_html_template.pl file:
added the line linkcolor => $linkcolor,
to the sub site_html_category {
# --------------------------------------------------------
# This rountine will build a page based for the current category.
return &load_template ( 'category.html', {
routine
*******************************************
in nph-build.cgi file:
sub build_category_pages routine,
local ($description, $related, $meta_name, $meta_keywords, $header, $footer, $linkcolor, $next, $prev);
Then in category.html template, I am using the tag <%linkcolor%>
I have added the field in my category.db file, and it is showing up and seen in the admin section when you modify a category, but it is not displaying what's in the field. I don't get an error msg that it doesn't recognize the tag - it's as if it just doesn't pull in what's supposed to be in the field.
What I am doing wrong?
category.def file:
%db_def = (
ID => [0, 'numer', 5, 8, 1, '', ''],
Name => [1, 'alpha', 40, 75, 1, '', '^[\w\d/_-]+$'],
Description => [2, 'alpha', '40x3', 500, 0, '', ''],
Related => [3, 'alpha', 0, 255, 0, '', ''],
'Meta Description' => [4, 'alpha', 40, 75, 0, '', ''],
'Meta Keywords' => [5, 'alpha', 40, 75, 0, '', ''],
Header => [6, 'alpha', 40, 75, 0, '', ''],
Footer => [7, 'alpha', 40, 75, 0, '', ''],
Linkcolor => [8, 'alpha', 40, 75, 0, '', '']
);
**********************************
in site_html_template.pl file:
added the line linkcolor => $linkcolor,
to the sub site_html_category {
# --------------------------------------------------------
# This rountine will build a page based for the current category.
return &load_template ( 'category.html', {
routine
*******************************************
in nph-build.cgi file:
sub build_category_pages routine,
local ($description, $related, $meta_name, $meta_keywords, $header, $footer, $linkcolor, $next, $prev);
Then in category.html template, I am using the tag <%linkcolor%>
I have added the field in my category.db file, and it is showing up and seen in the admin section when you modify a category, but it is not displaying what's in the field. I don't get an error msg that it doesn't recognize the tag - it's as if it just doesn't pull in what's supposed to be in the field.
What I am doing wrong?