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:
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.
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.