如何将数据从插件传递到应用/视图模板?

I think you should read through this series:

Pretty sure it is covered, you want to use the preload store here and then load it up on the client to avoid a double web request.