XF 2.1 Add an ad position between Public: Sidebar top / bottom

Orit

Active member
Hello
I'm reorganizing the widgets on my forum list page and would like to ad an ad position between the Public: Sidebar top and Public: Sidebar bottom widget positions.
But I can't find where those widget positions are set in the templates.

Can anyone help?

Thanks!!
 
\XF\Pub\App::renderPageHtml()
PHP:
if (!$skipSidebarWidgets)
{
    $topWidgets = $templater->widgetPosition('pub_sidebar_top');
    $bottomWidgets = $templater->widgetPosition('pub_sidebar_bottom');
    $templater->modifySidebarHtml('_xfWidgetPositionPubSidebarTop', $topWidgets, 'prepend');
    $templater->modifySidebarHtml('_xfWidgetPositionPubSidebarBottom', $bottomWidgets, 'append');

    $params['sidebar'] = $templater->getSidebarHtml();
    $params['sideNav'] = $templater->getSideNavHtml();
}

Template PAGE_CONTAINER
Code:
<xf:if is="$sidebar">
    <div class="p-body-sidebar">
        <xf:ad position="container_sidebar_above" />
        <xf:foreach loop="$sidebar" value="$sidebarHtml">
            {$sidebarHtml}
        </xf:foreach>
        <xf:ad position="container_sidebar_below" />
    </div>
</xf:if>
 
\XF\Pub\App::renderPageHtml()
PHP:
if (!$skipSidebarWidgets)
{
    $topWidgets = $templater->widgetPosition('pub_sidebar_top');
    $bottomWidgets = $templater->widgetPosition('pub_sidebar_bottom');
    $templater->modifySidebarHtml('_xfWidgetPositionPubSidebarTop', $topWidgets, 'prepend');
    $templater->modifySidebarHtml('_xfWidgetPositionPubSidebarBottom', $bottomWidgets, 'append');

    $params['sidebar'] = $templater->getSidebarHtml();
    $params['sideNav'] = $templater->getSideNavHtml();
}

Template PAGE_CONTAINER
Code:
<xf:if is="$sidebar">
    <div class="p-body-sidebar">
        <xf:ad position="container_sidebar_above" />
        <xf:foreach loop="$sidebar" value="$sidebarHtml">
            {$sidebarHtml}
        </xf:foreach>
        <xf:ad position="container_sidebar_below" />
    </div>
</xf:if>
Thank you!!
Well, I guess this doesn't really help me. I thought I can just place it in the html...
 
Back
Top Bottom