XF 2.2 data-load-target doesnt work in off-canvas

FlavorFlav

New member
hello there,

I've edited the conversations and notifications menu from the usernavigation to open as a sidebar menu. Now I've got the problem that my content which is displayed with a data-load-target isn't loading if I put the data-xf-click as an off-canvas instead a menu. How can I load my content within an off-canvas? If I add a "menu" next to the "off-canvas" it becomes incorrect and doesn't close/open correctly like before.

HTML:
<li>
    <a href="{{ link('conversations') }}"
    class="p-navgroup-link p-navgroup-link--iconic p-navgroup-link--conversations js-badge--conversations badgeContainer{{ $xf.visitor.conversations_unread ? ' badgeContainer--highlighted' : '' }}"
    data-badge="{$xf.visitor.conversations_unread|number}"
    data-xf-init="tooltip" data-original-title="{{ phrase('nav_inbox') }}"
    data-xf-click="off-canvas"
    data-menu=".canvasConversations"
    data-xf-key="{{ phrase('shortcut.conversations_menu')|for_attr }}"
    data-menu-pos-ref="< .p-navgroup"
    title="{{ phrase('conversations')|for_attr }}"
    aria-label="{{ phrase('conversations')|for_attr }}"
    aria-expanded="false"
    aria-haspopup="true">
        <span class="p-navgroup-linkText">{{ phrase('nav_inbox') }}</span>
    </a>
                             
    <div class="canvasMenu canvasConversations" aria-hidden="true"
        data-href="{{ link('conversations/popup') }}"
        data-nocache="true"
        data-load-target=".contentConversations">
        <div class="offCanvasMenu-backdrop" data-menu-close="true"></div>
        <div class="canvasMenu_content">
            <div class="contentConversations">
                {{ phrase('loading...') }}
            </div>
        </div>
    </div>
</li>
 
Last edited:
Top Bottom