XF 2.0 How to have a left sidebar while keeping the right sidebar

Well, an easy way, edit page_container, find:



Code:
<div class="p-body-content">

Add right above:

Code:
            <div class="p-body-left">
                <xf:widget key="forum_overview_forum_statistics" />
            </div>

Then add this to your extra.less:

Code:
.p-body-content
{
    padding-left: 10px;
}
.p-body-left
{
    display: table-cell;
    vertical-align: top;
    width: 250px;
}
@media (max-width: 900px)
{
    .p-body-left
    {
        width: auto;
        display: block;
    }
}

You can put whatever content instead of the stats, I just used that as an example on how you can call widgets into that spot. If you want a custom widget there, simply create the widget but don't give it a location. Then call it via the widget key.

This will add it on every single page, so you may need to limit it using a conditional:

Code:
            <xf:if is="$template == 'forum_list'">
            <div class="p-body-left">
                <xf:widget key="forum_overview_forum_statistics" />
            </div>
            </xf:if>
 
Back
Top Bottom