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

Add a field..

Quote Reply
Add a field..
here is what I did: In the category table maintenance, I added a field called "Banner". Then I inserted the tag <%Banner%> in the pages but it wrote:
Unkown Tag: Banner
What did I do wrong????


theuls

---------------------------------
surfootball.com your soccer index
Quote Reply
Re: Add a field.. In reply to
Did you update your Category.def file?

Regards,

Eliot Lee

Quote Reply
Re: Add a field.. In reply to
First, if you use the Table/Edit features of the Admin program, the .def file is properly updated. If you use MySQLMan or another program, or even the SQL Monitor directly it's not.

But, the Category table is a special case. You need to go into the nph-build.cgi file, build_category_pages subroutine, where you see the list of fields:

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{random} = rand (10000);
$OUT{random1} = rand (10000);
$OUT{random2} = rand (10000);
$OUT{random3} = rand (10000);
You need to add any field you want to pass in the "category" table to the $OUT{} hash, otherwise it won't be passed.

The Links table is automatically generated, and hopefully in a future release this will too, but I guess the thinking was the Category table won't change much, but the Links table is infinitely variable, so they made sure that table was fully dynamic.


http://www.postcards.com
FAQ: http://www.postcards.com/FAQ/LinkSQL/