This forum has moved, please join us on github discussions. We will keep these old posts available for reference. Thank you!

Do we have middleware/hook which can set global.data from API?

My requiment is I have an API which will provide user data. In the Apostrophe CMS I need to access the user data from all the layouts (Header, Main, Footer).

I can see gobal.data which is avaiable everywhere in the template. Likewise I need a hook which will call the API and store the response data in the Apostrophe’s global.data.

Please let me know if you need further informations.