Gossamer Forum
Home : Products : Gossamer Links : Pre Sales :

category list in template category-new-cool

Quote Reply
category list in template category-new-cool
Hello all,

I wanna use the category list (like the cats list that is displayed on home.html) in the template category.html, cool.html, new.html and search.cgi.

I can hard code it, but if i add 1 category i have to manual add it in the templates can be done but that's the easy way.

When i use <%category%> in example cool.html it tells my Unkown Tag: category. What do i have to do to make this work in cool.html, new.html, category.html and search.cgi ? modify nph-build.cgi ?

Allready thanks.

Regards Startpoint.

Quote Reply
Re: category list in template category-new-cool In reply to
You have to modify the following sub-routines in the nph-build.cgi script:

Code:

sub build_cool_page
sub build_new_page


Look for the following codes:

Code:

$OUT{'link_results'} .= qq|<P><A HREF="$LINKS{bu
ild_root_url}/$category_clean/$LINKS{build_index}">$category</A>\n|;


Also, BTW, <%category%> is only defined in the sub build_category_pages, which is called into the sub build_home_page routine. So, you cannot use the tag in other template files than home.html and category.html.

Also, if you click on the following link after selecting a template to edit:

Template Help and Codes you can use!

in the admin.cgi script, you will see a list of tags that you can use in each template file.

Regards,

Eliot Lee



Quote Reply
Re: category list in template category-new-cool In reply to
Thanks AnthroRules for your reply.

Because i have a deadline for my project i will use the easy way, just hardcode it in the new,cool,search.cgi pages. So when i add a new catetory it will not added automatic, but i don't have to time too figure this one out.

--- Sometimes the easy way isn't the best way ! Smile

Regards startpoint.

Quote Reply
Re: category list in template category-new-cool In reply to
In Reply To:
Sometimes the easy way isn't the best way !
That is correct, especially when long term maintenance is an issue.

Regards,

Eliot Lee