Is there a way to respond to on_after_save for a page?

edited June 2014 in Bug Reports
I want to be able index a page (using the search module) every time a page is saved. I can do this easily when I have created the model myself, but I don't know how to do this for pages.

Comments

  • edited 4:41AM
    There is actually a hook that comes with the search module that does just that. Add the following to your fuel/config/hooks.php file:
    include(SEARCH_PATH.'config/search_hooks.php');
  • edited 4:41AM
    Cool! Thank seemed to work. My concern is that I don't necessarily want it to index ALL of my modules. If a model doesn't have a view is it still indexed?
  • edited 4:41AM
    No. It just indexes those that have a preview_path value specified.
  • edited 4:41AM
    Perfect! Thank you :)
Sign In or Register to comment.