Kia ora folks,
Just a need a (hopefully) quick pointer in the right direction. I want to retrieve a value (json) from an external URL and display it in the header.
The webservice is public and just returns a single value like this:
I’m running discourse self-hosted, standard install.
I’m not too concerned if the call is made client side or server side, the webservice is public.
What’s the best way to approach this. Would I need a plug-in, a theme component? Or can this be done out of the box?
A theme component is easier to install and maintain. It would make the remote ajax call at least for every user (if it doesn’t change, though, I think one call in an intitializer wouldnt’ be that big a deal).
A plugin might allow you to cache the result and just add it to the serializer.