Consistency in sidebar HTML

Dad.

Well-known member
Hey there!

This is just a simple suggestion involving the organization of the sidebar. Currently there are 3 main problems:

1. Designers are having a tough time designing a consistent sidebar for XenForo, the Resource Manager, and third-party plugins. Two such examples are: Widget framework by @xfrocks and XenMediaGallery by @Chris Deeming .

2. There is no block HTML markup standard for the sidebar. The Resource Manager has different HTML than the main XenForo. Also, the profile page also has a sidebar but has 3 different types of blocks.

3. There is no simple way to move the sidebar to the left side, out of the box.

I want to propose a very simple change to both the RM and XenForo.

1. Modify the style of the sidebar to be in this form, or something similar:

Code:
<div class="sidebar">

    <!-- Start a block -->
    <div class="block block_type" id="block_{$block.id("or block.name or some unique identifier if applicable")}">
        <div class="block_title"><h3>{$block.name}</h3></div>
        <div class="block_content">
            Whatever you want, secondaryContent is fine like it currently is, doesn't matter much
        </div>
    </div>
    <!-- End a block -->

    <!-- More blocks here -->

</div>

Doing so will allow much more control over the blocks. You can have multiple views based on the #content class name, like forum_list, forum_view, member_view, etc. and style blocks uniquely. You don't need the unique identifier, but could be an optional parameter.

2. Add another class to the HTML class attribute. <html class="Sidebar <if $sidebarPos == left">SidebarLeft</if>"> Then, of course, some CSS would need to be done to allow people to move it to said location. This is mainly for developers to allow them to move the sidebar to different sides without having to create their own markup.

That is all, I dragged out the explanation longer than it needed to be :p

Thanks for considering!
 
Upvote 12
New profile posts does not have a unique selector, so now I cannot style that block differently without a template edit.

ETA: no its not possible even with a template edit.
 
Yeah, fair to say it is done :)

We won't actually go through all the Suggestions and mark them all implemented yet, though. There's obviously a reasonable amount to show off, and in more detail. So we'll do it all in one go.
 
Top Bottom