XF 1.5 Inject where?

Robert9

Well-known member
I have an addon with some listeners

category
forum
thread

i want to add now for example
resource
resource cats

imagine that i have just one more field called "example" to every one of these tables. (node.example, thread.example, resource.example ...)
In this field i save a serialized array.

Everything i have to do now is to unserialize this field and add the array values to viewParams

I have done this now with one listener to every ControllerPublic, but all of these finally use one and the same template PageContainer;
all of these bring the value of their field example with them.

So there should be a place where i can do my unserialize on one spot with one listener?

Instead:
show a resource => listener resource => unserialize => PageContainer
show a thread => listener thread => unserialize => PageContainer
...



i want to do something like

show a resource => listener X => unserialize => PageContainer
show a thread => listener X => unserialize => PageContainer
...

May someone give me a hint, please?
 
Top Bottom