XF 2.0 Profile page custom tabs?

grantus

Active member
Is there a way to add a custom tab to the profile pages? I tried this:

Code:
<a href="{{ link('test/', $user) }}" class="tabs-tab" id="test" role="tab">test</a>

And even though it shows the tab, it screws up the other tabs and they don't load those templates. Instead, they go to their own page.

I was hoping I could do this with the public navigation, but that only seems to be for the main menu. Or am I missing something?
 
This is the most basic implementation of a tab, I think ideally you'll want this to be handled via an add-on but maybe you can work with this...

template: member_view

Find:
Code:
<!--[XF:tabs:end]-->

Add right above it:

Code:
                    <a href="{{ link('members', $user) }}"
                        class="tabs-tab"
                        role="tab"
                        aria-controls="custom-tab">Custom Tab</a>

Next find:

Code:
<!--[XF:tab_panes:end]-->

Add right above:

Code:
    <li class="is-active" role="tabpanel" id="custom-tab">
        <div class="block">
            <div class="block-container">
                <div class="block-body">
                    <div class="block-row">
                        custom content
                    </div>
                </div>
            </div>
        </div>
    </li>
 
That's what I was looking for! But how would I go about displaying content from a template or a custom page? Because I see that for example, the "about" tab's content is from the member_about template, so how does it pull from that? Ideally I would like to display content not from within the member_view template.

Thanks.
 
That's what I was looking for! But how would I go about displaying content from a template or a custom page? Because I see that for example, the "about" tab's content is from the member_about template, so how does it pull from that? Ideally I would like to display content not from within the member_view template.

Thanks.

That you'll probably need an add-on for. You could easily add like custom fields into this content area, but getting more advanced will probably require an add-on.
 
Back
Top Bottom