<xf:title>{$trending.title}</xf:title>

<xf:wrap template="forum_overview_wrapper" />

<xf:page option="uix_mainTabSets" value="forum" />
<xf:page option="uix_mainTabActive" value="trending" />

<xf:pageaction>
	<xf:if is="$xf.visitor.canCreateThread()">
		<xf:button href="{{ link('forums/create-thread') }}" class="button--cta" icon="write" overlay="true">
			{{ phrase('post_thread...') }}
		</xf:button>
	</xf:if>
</xf:pageaction>

<xf:widgetpos id="thtrending_trending_sidebar" position="sidebar" />
<xf:widgetpos id="thtrending_trending_sidenav" position="sidenav" />
<xf:if is="$xf.options.forumsDefaultPage === 'thtrending_trending_list'">
	<xf:widgetpos id="thuix_index_page" position="sidebar" />
</xf:if>

<xf:widgetpos id="thtrending_trending_above_threads" />

<xf:if is="count($trendingConfigs) > 1">
<div class="tabs tabs--standalone">
	<div class="hScroller" data-xf-init="h-scroller">
		<span class="hScroller-scroll">
			<xf:foreach loop="$trendingConfigs" value="$item">
				<a href="{{ link('trending', $item) }}" class="tabs-tab {{ ($trending.trending_id == $item.trending_id) ? 'is-active' : '' }}">{$item.title}</a>
			</xf:foreach>
		</span>
	</div>
</div>
</xf:if>

{$trending.renderTrendingContent()|raw}

<xf:widgetpos id="thtrending_trending_below_threads" />