XF 1.5 AJAX works but isn't putting out header or breadcrumbs

I am using AJAX on my site and it's working. Whenever you click a link, the site loads with the new content. The new content, however, isn't the full content and only partial. The new content doesn't include the header or breadcrumbs. Here is my code:
//* @param {jQuery} $ jQuery Object */
!function($, window, document, _undefined)
    XenForo.ContentLoader = function($link)
                function(ajaxData, textStatus)
                    if (ajaxData.templateHtml)
                        new XenForo.ExtLoader(ajaxData, function()
                        $(ajaxData.templateHtml).xfInsert('replaceAll', $link.data('target'));

        // *****************************************************************
        XenForo.register('a.ContentLoader', 'XenForo.ContentLoader');
(jQuery, this, document);
Whenever you click a link with class="ContentLoader" data-target="#whatever", the new content loads wherever specified with id="whatever"

I would like the code to be loaded like this:

Now click about us at the bottom of the page. You will see the template is being stripped of breadcrumbs and header. WHY?! Anyone please help.


XenForo developer
Staff member
You'll need to consider taking a different approach. We never return any of the "container" data with Ajax/JSON requests.