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

New Category Heading -- How?

Quote Reply
New Category Heading -- How?
Okay, I hope this makes sense:

I would like to create a new category heading similar to "Categories," "Links," and "Related Categories" in the category.html file called "Featured Sites." This heading will be created, and links will be listed, if there are any links that have been tagged as featured (I have already set this up in the DB with a "Priorty" field).

So basically what I need to know is:

1) How to create a new heading in a category such as the Links and Categories ones.
2) How to activate this heading only when there are sites within the category that have been tagged as featured.

Has anyone done something similar to this before or does anyone have any ideas on what I can do here?

Much appreciated!

Quote Reply
Re: New Category Heading -- How? In reply to
Something like this was discussed a week or so ago.

The basic idea would be to create a new tag <žatured%> the same way there is a tag for <%related%>.

All you'd need to do is create a new routine, to generate the data for that tag, the same way the data is generated for the others.

You'd want to SELECT the links that are in that category AND which are flaged isFeatured. If that query returns a non-null value, then you process the results the same you process any results from a SELECT (check the search.cgi) and put that into the $featured variable, which is then passed to the 'category' template, and is available as <žatured%> during a build.

Check the posts for the past 2 weeks. You'll find some others have been discussing this similar issue.