My addon extends threads controller as well as xf_threads table and has its own route.
My goal is to "override" links to threads in all templates, for example:
So that conditionally, it can use the correct route and return the overridden link if the thread is the extended type.
I know I can use assertCanonicalUrl in the controller but wondering if I can take it a step further.
I think what I'll need to do is create a new event listener for router_public_setup and I had an idea of how to implement this at 3am last night but now I forgot lol.
Is what I want to do even doable with router_public_setup or is there a better way to implement this?
My goal is to "override" links to threads in all templates, for example:
Code:
link('threads', $threads)
So that conditionally, it can use the correct route and return the overridden link if the thread is the extended type.
I know I can use assertCanonicalUrl in the controller but wondering if I can take it a step further.
I think what I'll need to do is create a new event listener for router_public_setup and I had an idea of how to implement this at 3am last night but now I forgot lol.
Is what I want to do even doable with router_public_setup or is there a better way to implement this?