XF 2.1 How to add something that is globally avaiable?

Hoffi

Well-known member
I want to create some small amount of data, which I need at several point. In XF1 I used the SimpleCache. But here it seems to be only avaiable for AddOn Data?

I was able to write Data in this container, but is it possible to read this easily everywhere?

On Idea was to create a hidden Options field which I can fill with a JSON... but thats a bit misusing of functionality.

One I tried to add data in the final post element. But this may needed to add to every macro caller, thats not what I wanted to do.
 
Meanwhile I tunneld the information via 5 Template Mods to the final Macro. This works, but looks very wierd in the List of Template Mods. Not sure if this is the best solution.
 
There's a code event for templater global data. I don't remember the exact name, but you'll find it in the code events list in the development section in the ACP.
 
Back
Top Bottom