Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Controller that populates category pages?

1) What's the controller that handles requests for category-specific discussions e.g. http://localhost//categories/?

2) I'm building a component that automatically creates a category (e.g. if doesn't exist) and filters content for and presents it. Is there a custom event/magic event/method in this controller to hook my plugin into, if i develop this logic as a plugin?

3) Finally, the function that adds a category (CategoryModel->Save) is tied to the HTML Form post returned from the dashboard .. So, i guess i'd need to write my own function that validates against duplicate category URL/Names and adds categories, correct (i.e. i can't leverage functions already written in the MVC framework)?

thanks
Kiran

Tagged:

Comments

  • @kiran123 said:
    1) What's the controller that handles requests for category-specific discussions e.g. http://localhost//categories/?

    Categories controller.

    2) I'm building a component that automatically creates a category (e.g. if doesn't exist) and filters content for and presents it. Is there a custom event/magic event/method in this controller to hook my plugin into, if i develop this logic as a plugin?

    What are you actually trying to do?

    3) Finally, the function that adds a category (CategoryModel->Save) is tied to the HTML Form post returned from the dashboard .. So, i guess i'd need to write my own function that validates against duplicate category URL/Names and adds categories, correct (i.e. i can't leverage functions already written in the MVC framework)?

    You have BeforeSaveCategory event hook. e.g. $Sender->Validation->AddValidationResult('Name') etc. I already validates against the slug being unique.

    From my understand you actually wan to hook the post controller. Because it is a post that determines the new category. You wan to hook earlier than the validation for categories.

    grep is your friend.

Sign In or Register to comment.