$externalDataUrl in templates?

Jake Bunce

XenForo moderator
Staff member
You can use this in the PHP code to get that value:

Code:
XenForo_Application::get('config')->externalDataUrl
But I don't see any default or container params with the config information (for use in the templates).
 

Jaxel

Well-known member
I would rather not have to do it in PHP code... otherwise I have to start editing TONS of files to pass it.
 

Jake Bunce

XenForo moderator
Staff member
You could use the container_public_params event to add it to the container params. That would allow you to access the variable in PAGE_CONTAINER and other included templates. But if you need it in your content template then you need to add it to the controller, in a _postDispatch function perhaps (to affect all actions). Or maybe the front_controller_pre_view event will work as it has access to the controllerResponse.
 

Jaxel

Well-known member
Bah, I solved it by simply making my own helper:
Code:
<img src="{xen:helper medio, $media}" />
 
Top