XF 2.2 Post a thread button

Faust

Well-known member
Hi. I would like to add an action button on a specific page, but when I use that code , seems that the standard button xenforo “post a thread” appears too. Is there any way, to make that removed, or hidden on specific page ? Thanks
 
Hi @Brogan . I did copied the code from forum_list and added into a new page, to achieve a CTA button.

I took the code from forum overview wrapper, which is:

Code:
<xf:pageaction>
    <xf:if is="!property('uix_removeWhatsNewButtons')">
        <xf:if is="$pageSelected == 'new_posts' ">
            <xf:button href="{{ link('forums/list') }}" icon="list">
                {{ phrase('forum_list') }}
            </xf:button>
        <xf:else />
            <xf:button href="{{ $xf.options.forumsDefaultPage == 'new_posts' ? link('forums/new-posts') : link('whats-new/posts') }}" icon="bolt">
                {{ phrase('new_posts') }}
            </xf:button>
        </xf:if>
    </xf:if>
    <xf:if is="$xf.visitor.canCreateThread() OR $xf.visitor.canCreateThreadPreReg()">
        <xf:button href="{{ link('forums/create-thread') }}" class="button--cta" icon="write" overlay="true">
            {{ phrase('post_thread...') }}
        </xf:button>
    </xf:if>
</xf:pageaction>

It does what I want with minor thing, I got 2 buttons now, one the default by XF and an other by my style. What I want, is to remove or hide the default one and leave only the style, on that specific page.
 
Top Bottom