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

XF 2.0 Load template by ajax


Active member
Hello, if I load a template by ajax

return $this->view('XF:Member\Listing', 'my_template_name', $viewParams);

this loads the full page structure, how do I load only the contents of the template?

Thank you!


XenForo developer
Staff member
If you're doing this through XF's ajax systems/existing JS frameworks, this should generally happen automatically. You'll need to give more details about how you're calling this code.