How can I recognize when plugins.fireHook is throwed?

NodeBB Development
  • GNU/Linux
    #1

    I need to recognize when the hook is fire in the pages, because for some pages in my plugin I need to do something.

    plugins.fireHook('filter:topics.get', {topics: topics, uid: uid}, next);
    

    is there some method that I can use to do this?

  • NodeBB
    #2

    You can use the filter:<templateName>.build hooks. For the category page it would be filter:category.build, for a topic page it would be filter:topic.build and so on.


Suggested Topics


| | | |