Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Show only some Categories

Quote Reply
Show only some Categories
How I can do to show only categories I need ?

Thanks in advance, Fabio
Bye From Italy


Quote Reply
Re: Show only some Categories In reply to
1) Add a column in the Category table called ShowCat (ENUM - Yes/No).

2) Then hack the sub build_category_pages in the nph-build.cgi and also page.cgi to include conditional statements (if/else) based on the YES/NO value for the ShowCat column...could be added as a plugin.

Regards,

Eliot Lee
Quote Reply
Re: Show only some Categories In reply to
Thanks but I don't understand how I do it ?
Can U explain so more?

Fabio
Bye From Italy

Quote Reply
Re: Show only some Categories In reply to
HELP ME PLEASE

Thanks advance
Fabio

Quote Reply
Re: Show only some Categories In reply to
Contact GT or an experienced Links SQL user but expect to pay.

Installations:http://www.wiredon.net/gt/
Favicon:http://www.wiredon.net/favicon/

Quote Reply
Re: Show only some Categories In reply to
The way I did it, was add a column in the Category table called 'Visible' as an ENUM('Yes','No') type, defaulting to Yes then added the following at the top of the subcategory.html template:

Code:
<%if Visible eq 'Yes'%>
Then at the bottom put:

Code:
<%endif%>
Then you just put No in the categories you don't want displayed.

It simply doesn't add a link to the category on any page that uses subcategory.html to generate a list of them. This modification still allows you to see the category once the site is built, if you know it's name, so it is not for everybody, but it works for our purposes.

Hope that helps,
-Steven


Quote Reply
Re: Show only some Categories In reply to
Can U do it for me?

Thanks in advance

Quote Reply
Re: Show only some Categories In reply to
In Reply To:
Can U do it for me?
I thought that's what I did.

Just cut and paste. Surely you can do that.

-Steven


Quote Reply
Re: Show only some Categories In reply to
What You did for Me?

Thanks in advance
Bye from Italy
Fabio

Quote Reply
Re: Show only some Categories In reply to
Eliot:

This is going to be an excellent solution to my problem of assigning a default category to sites submitted that do not include a category which makes up the bulk of my database. This way Links is happy and I'm happy. I just love it when everyone's happy. Don't you agree? Smile

I do have one question, though. I'm at the Category Properties screen in another browser window right now. What are the Form Information fields for? Can I just leave them and add the column without them?

Mark Brasche
http://SurfSafely.com/
Quote Reply
Re: Show only some Categories In reply to
Form Information...I believe is for adding additional info for user-end forms...I believe you can keep it blank.

Regards,

Eliot Lee
Quote Reply
Re: Show only some Categories In reply to
Eliot,

I added the column and resync'd the database. I also found in nph-build.cgi where I placed my previous hack that went

Code:
unless($id eq "91"){
(Build category code)
}#end unless $id91
Can you tell me what the syntax is for use with the values in the new ShowCat column?

Thanks.

Mark Brasche
http://SurfSafely.com/