1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Template Hooks

Discussion in 'XenForo Development Discussions' started by Lee, Apr 27, 2013.

  1. Lee

    Lee Well-Known Member

    I have created two separate code event listeners which are looking at the same template hook point and inserting custom HTML.

    They both work, but I want to know if there is way to prioritise which one is displayed first?

  2. tenants

    tenants Well-Known Member

    You can set the Callback Execution Order

    Go into the ACP, go to "Code Event Listeners"
    Find your listener and edit it

    Now at the bottom you will see "Callback Execution Order"

    Generally this is not needed, since if you extend things correctly.. the order that things extend do not matter... since the parent params will be passed through and everything will get called

    But, there are times where this might be useful especially if 2 resources are competing, or you need them to occur in a particular order

Share This Page