MG 1.1 How to rearrange media sidebar

Corey haas

Member
I'd like to put "Categories" to the top of the media sidebar. (above "Media Navigation" and "Albums")

Is there a way I can do this? I tried looking through all the templates and came up empty.

Thanks
 
It can be done in the template.

The tempalte is: xengallery_category_wrapper

Find:
Code:
<xen:if is="{$canViewCategories}">
    <xen:if hascontent="true">
        <div class="section">
            <dl class="secondaryContent">
                <h3>{xen:phrase xengallery_categories}</h3>
                <xen:contentcheck>
                    {xen:raw $categoryHtml}
                </xen:contentcheck>
            </dl>
        </div>
    </xen:if>
</xen:if>
And move that entire block up so it is before:
Code:
<xen:include template="xengallery_wrapper_media_home" />
 
My template now shows the following :

{xen:raw $_subView}

<xen:container var="$bodyClasses">xengalleryPage</xen:container>

<xen:require css="xengallery_wrapper.css" />

<div class="xengallerySideBarContainer">
<div class="xengallerySideBar">

<xen:if is="{$canViewCategories}">
<xen:if hascontent="true">
<div class="section">
<dl class="secondaryContent">
<h3>{xen:phrase xengallery_categories}</h3>
<xen:contentcheck>
{xen:raw $categoryHtml}
</xen:contentcheck>
</dl>
</div>
</xen:if>
</xen:if>

<xen:include template="xengallery_wrapper_media_home" />

<xen:if is="{$canViewAlbums}">
<div class="section">
<dl class="secondaryContent">
<h3>{xen:phrase xengallery_albums}</h3>
<ol class="categoryList albumCategory">
<li class="{xen:if {$albumsSelected}, 'selected'}">
<a href="{xen:link 'xengallery/albums'}">{xen:phrase xengallery_browse_albums}</a>
</li>
<xen:if is="{$visitor.user_id}">
<li class="{xen:if {$ownMediaSelected}, ' selected'}">
<a href="{xen:link 'xengallery/users/albums', $visitor}">{xen:phrase xengallery_your_albums}</a>
</li>
<li class="{xen:if {$sharedMediaSelected}, ' selected'}">
<a href="{xen:link 'xengallery/albums/shared'}">{xen:phrase xengallery_albums_shared_with_you}</a>
</li>
</xen:if>
</ol>
</dl>
</div>
</xen:if>
<xen:if is="{$xenOptions.xengalleryShowRecentComments.enabled}">
<xen:include template="xengallery_recent_comments_block">
<xen:set var="$limit">{$xenOptions.xengalleryShowRecentComments.limit}</xen:set>
<xen:set var="$title">{xen:phrase xengallery_recent_comments}</xen:set>
</xen:include>
</xen:if>

<xen:if hascontent="true">
<div class="section">
<dl class="secondaryContent avatarList">
<h3>{xen:phrase xengallery_top_contributors}</h3>
<ol class="recentComments">
<xen:contentcheck>
<xen:foreach loop="$users" value="$user">
<xen:if is="{$user.xengallery_media_count}">
<li>
<xen:avatar user="$user" size="s" img="true" href="{xen:link xengallery/users, $user}" class="NoOverlay" />
<xen:username user="$user" rich="true" href="{xen:link xengallery/users, $user}" class="NoOverlay" />
<div class="extraData"><a href="{xen:link xengallery/users, $user}">{xen:phrase xengallery_media_items_count, 'count={xen:number $user.xengallery_media_count}'}</a></div>
</li>
</xen:if>
</xen:foreach>
</xen:contentcheck>
</ol>
</dl>
</div>
</xen:if>

<xen:if is="{$xenOptions.xengalleryShowStatisticsBlock.gallery_side}">
<xen:include template="xengallery_media_statistics_block" />
</xen:if>
</div>
</div>
 
It looks like the change you made is correct.

If you go into a category itself, does it look correct?

If so, the only other place to change it is for album pages. You can do this by making a very similar change to the xengallery_album_wrapper template.
 
Top Bottom