how to figure out where the hook is launched

  • GNU/Linux

    Suppose to have this hook:

    "hook": "filter:topics.get", "method": "orderTopics"

    I know that when the hook is called the method is execute, but I don't want always execute the method. For some url like this:


    I don't want that the hook is throwed and I want specify this in the method:

    //server side library.js
    converter.orderTopics = function(data, callback) {
    //Something like this
    var url_station=url.getUrl() // give me the current url 

    Anyone can help me?

  • NodeBB Admin

    filter:topics.get does not provide that data, you can probably use one of the page build hooks like etc. each page has one and it provides alot more data including the url.

Suggested Topics

| | | |