question - what do I do when a needed var is not avail in a template

Mutt

Well-known member
I'm in template editor_dialog_media. it's the little popup you get when you click the media button to embed a video. I wanted to hide some of the available sites that you can embed in the majority of the forums & just show them in my adult forum. seemed like it would be real easy to throw up a if node = deal but evidently, node is not available here. I tried $forumId, $forum.node_id, & for fun I even tried $thread.node_id. Only var I really see in the template other than visitor is $site but it didn't know $site.node_id.

what are my options? do I really need an addon for this or is there some cool xen way to suck in the var?
 
You would have to extend this controller:

XenForo_ControllerPublic_Editor::actionDialog

The $viewParams in that function are what define the available variables. The forum record is not available by default.
 
Top Bottom