Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

exclude specific catagories?

Quote Reply
exclude specific catagories?
I need to be able to exclude a root category and all it's children from the pool of categories a user may add links to.

What I'm intending to do is after validation, the link is then automatically added to additional categories based on certian criteria in the form input. I can't allow any of those categories to be directly added to as it would break my plugin (by adding links to date based categories for with the event does *not* occur on). I know that can grep out the unwanted selected categories with a PRE hook on handle_add, but that's not really the method I want to go with, since the categories will still appear in the submission form.

I know that somewhere I need to do something like:

Code:
<%if ID != $EventCalendar.root_cat_id or CatRoot != $EventCalendar.root_cat_id%>
normal code here
<%endif%>

($EventCalendar.root_cat_id is the root category of my automated category listings)

What's the best way to do this? I'd really prefer to use a a plugin hook to overide the standard selection lists, rather than a template hack in include_form.html, if possible.

Thanks

Philip
------------------
Limecat is not pleased.
Subject Author Views Date
Thread exclude specific catagories? fuzzy logic 2345 Oct 12, 2006, 1:42 AM
Thread Re: [fuzzy logic] exclude specific catagories?
brewt 2270 Oct 19, 2006, 12:44 PM
Post Re: [brewt] exclude specific catagories?
fuzzy logic 2256 Oct 19, 2006, 9:20 PM