• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

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


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?

Jake Bunce

XenForo moderator
Staff member
You would have to extend this controller:


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


XenForo developer
Staff member
That page isn't forum-specific, so you'd have to go hacking the JS and editor templates too...