1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

MG 1.1 How to rearrange media sidebar

Discussion in 'Media Gallery Support' started by Corey haas, Dec 31, 2015.

  1. Corey haas

    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
     
  2. Corey haas

    Corey haas Member

    If this is not possible, is there a way I could have Categories in the .actionFilterRow as shown in this photoshop mock up.

    Thanks ssxen.jpg
     
  3. Chris D

    Chris D XenForo Developer Staff Member

    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" />
     
    viper357 and Redh like this.
  4. Corey haas

    Corey haas Member

  5. Corey haas

    Corey haas Member

    It worked :)
     
    Chris D likes this.
  6. Bullwinkle

    Bullwinkle New Member

    I just did what Chris D suggested and it doesn't work for me. I'd like to have the Categories to the top of the Media sidebar too. Can someone help me ?
     
  7. Bullwinkle

    Bullwinkle New Member

    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>
     
  8. Chris D

    Chris D XenForo Developer Staff Member

    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.
     
  9. Bullwinkle

    Bullwinkle New Member

    smacks@you Chris D !!! It worked with the change to the xengallerry_album_wrapper template. (y)
     

Share This Page