XF 2.0 How can I add the CTA 'Add Media' or 'Add Resource' buttons to the home page next to the 'Post Thread' button

RobinHood

Well-known member
Kind of like this:

I can't figure out where to look in the templates to figure this out, and I'm guessing there's more to it than I think to ensure data is there to populate the pop up list.

I only want to do it for media, but other people my find the resource one useful too.

1519906881233.webp
 
You can add it editing the template forum_overview_wrapper
Code:
    <xf:if is="$xf.visitor.canAddMedia()">
        <xf:button href="{{ link('media/add') }}" class="button--cta" icon="add" data-xf-click="overlay">
            {{ phrase('xfmg_add_media...') }}
        </xf:button>
    </xf:if>
    <xf:if is="$xf.visitor.canAddResource()">
        <xf:button href="{{ link('resources/add') }}" class="button--cta" icon="write" overlay="true">
            {{ phrase('xfrm_add_resource...') }}
        </xf:button>
    </xf:if>
1520023296124.webp
 
You can add it editing the template forum_overview_wrapper
Code:
    <xf:if is="$xf.visitor.canAddMedia()">
        <xf:button href="{{ link('media/add') }}" class="button--cta" icon="add" data-xf-click="overlay">
            {{ phrase('xfmg_add_media...') }}
        </xf:button>
    </xf:if>
    <xf:if is="$xf.visitor.canAddResource()">
        <xf:button href="{{ link('resources/add') }}" class="button--cta" icon="write" overlay="true">
            {{ phrase('xfrm_add_resource...') }}
        </xf:button>
    </xf:if>
View attachment 170278
any idea how to do the same in xf 1.5.10 in and putting the button next to the add attachment button ?>
 
Back
Top Bottom