XF 2.0 Tabs loader, with hard links?

Jaxel

Well-known member
I am using the tabs loader in my addon:

PHP:
<div class="tabs tabs--standalone">
    <div role="tablist" class="hScroller" data-xf-init="tabs h-scroller"
            data-panes=".js-cartaTabPanes" data-state="replace">
        <span class="hScroller-scroll">
            <a href="{{ link('ewr-carta', $wiki) }}" class="tabs-tab is-active" role="tab">
                {{ phrase('page') }}</a>
            
            <xf:if is="$xf.visitor.hasPermission('EWRcarta', 'viewHistory')">
                <a id="history" href="{{ link('ewr-carta/history', $wiki) }}" class="tabs-tab" role="tab">
                    {{ phrase('history') }}</a>
            </xf:if>
        
            <xf:if is="$wiki.Thread">
                <a id="thread" href="{{ link('threads', $wiki.Thread) }}" class="tabs-tab" role="tab">
                    {{ phrase('EWRcarta_discussion') }} ({$wiki.Thread.reply_count})</a>
            </xf:if>

            <xf:if is="$wiki.canEdit()">
                <a id="edit" href="{{ link('ewr-carta/edit', $wiki) }}" class="tabs-tab" role="tab">
                    {{ phrase('edit') }}</a>
            </xf:if>
        </span>
    </div>
</div>

<ul class="tabPanes js-cartaTabPanes">
    <li class="is-active" role="tabpanel">
        <div class="block carta-page">
            <div class="block-container">
                <div class="block-body block-row">
                    {$wiki.parsed|RAW}
                </div>
            </div>
        </div>
    </li>

    <xf:if is="$xf.visitor.hasPermission('EWRcarta', 'viewHistory')">
        <li data-href="{{ link('ewr-carta/history', $wiki) }}" role="tabpanel">
            <div class="blockMessage">{{ phrase('loading...') }}</div>
        </li>
    </xf:if>

    <xf:if is="$wiki.Thread">
        <li data-href="{{ link('threads', $wiki.Thread) }}" role="tabpanel">
            <div class="blockMessage">{{ phrase('loading...') }}</div>
        </li>
    </xf:if>

    <xf:if is="$wiki.canEdit()">
        <li data-href="{{ link('ewr-carta/edit', $wiki) }}" role="tabpanel">
            <div class="blockMessage">{{ phrase('loading...') }}</div>
        </li>
    </xf:if>
</ul>

One of those tabs, I would like to be a hard-link. I don't want it to act as a javascript loader. Is there a way to do this?

Also, is there a way to get the last tab to appear on the opposite side of the tab bar?
 
Any idea about this? :)
I need to the following (for example one tab), to be link with re-visit:
HTML:
                <span class="hScroller-scroll">
                        <a href="{{ link('forums', $forum.Node) }}"
                            class="tabs-tab is-active"
                            role="tab"
                            aria-controls="s-threads" id="s-threads"
                            rel="nofollow">Discussions</a>
 
Last edited:
Top Bottom