Gossamer Forum
Home : Products : Gossamer Links : Discussions :

cat_id numbers

Quote Reply
cat_id numbers
Hi,
I'd like to use category numbers in category template.
Could someone please help me out?

I am going to use cat_id number to show targeted zone banneres, like zone_<%cat_id%>.cgi.

In Links 2, I did as follows;

In nph-build.cgi, sub build_category_pages.

Added
local ($cat_id);

After
local ($description, $related, $meta_name, $meta_keywords, $header, $footer, $next, $prev);

Next added
$cat_id = @{$category{$cat}}[$db_key];

After
$title_linked = &build_linked_title ($cat);
$title = &build_unlinked_title ($cat);
$total = ($#{$links{$cat}} + 1) / ($#db_cols + 1);
$category_name = $cat;
$category_name_escaped = &urlencode ($cat);
$category_clean = &build_clean ($cat);

And in site_html_templates_pl, sub site_html_category

Added
cat_id => $cat_id,

Best regards,
Moto

Subject Author Views Date
Thread cat_id numbers Moto 2594 Feb 16, 2001, 11:22 AM
Post Re: cat_id numbers
pugdog 2526 Feb 16, 2001, 3:56 PM
Thread Re: cat_id numbers
Alex 2514 Feb 16, 2001, 4:28 PM
Post Re: cat_id numbers
Moto 2494 Feb 16, 2001, 10:26 PM
Thread Re: cat_id numbers
pugdog 2530 Feb 16, 2001, 10:26 PM
Thread Re: cat_id numbers
Moto 2499 Feb 16, 2001, 11:58 PM
Post Re: cat_id numbers
Moto 2489 Feb 17, 2001, 12:14 AM