• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
  • This forum is for release discussion only. Discussions that do not relate specifically to the resource release should be discussed in another, more appropriate forum.
  • This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

SubCategories in Columns

CyberAP

Well-known member
#1
  1. Open template: node_forum_level_2
    Find
    PHP:
    <xen:if is="{$renderedChildren} AND {$level} == 2">
         <div class="Popup subForumsPopup">
             <a href="{xen:link forums, $forum}" rel="Menu" class="cloaked" data-closemenu="true"><span class="dt">{xen:phrase sub_forums}:</span> {xen:number $forum.childCount}</a>
     
             <div class="Menu JsOnly subForumsMenu">
                 <div class="primaryContent menuHeader">
                     <h3>{$forum.title}</h3>
                     <div class="muted">{xen:phrase sub_forums}</div>
                 </div>
                 <ol class="secondaryContent blockLinksList">
                 <xen:foreach loop="$renderedChildren" value="$child">
                     {xen:raw $child}
                 </xen:foreach>
                 </ol>
             </div>
         </div>
     </xen:if>
  2. Replace with:
    PHP:
    <xen:if is="{$renderedChildren} AND {$level} == 2">
         <div class="subForumsPopup">
             <div class="subForumsMenu">
                 <ol class="secondaryContent blockLinksList">
                 <xen:foreach loop="$renderedChildren" value="$child">
                     {xen:raw $child}
                 </xen:foreach>
                 </ol>
             </div>
         </div>
     </xen:if>
  3. Open template node_category_level_2
    Find there:

    PHP:
    <xen:if is="{$renderedChildren} AND {$level} == 2">
         <div class="Popup subForumsPopup">
             <a href="{xen:link categories, $category}" rel="Menu" class="concealed" data-closemenu="true"><span class="dt">{xen:phrase sub_forums}:</span> {xen:number $category.childCount}</a>
     
             <div class="Menu JsOnly subForumsMenu">
                 <div class="primaryContent menuHeader">
                     <h3>{$category.title}</h3>
                     <div class="muted">{xen:phrase sub_forums}</div>
                 </div>
                 <ol class="secondaryContent blockLinksList">
                     <xen:foreach loop="$renderedChildren" value="$child">
                         {xen:raw $child}
                     </xen:foreach>
                 </ol>
             </div>
         </div>
     </xen:if>
  4. Replace with:

    PHP:
    <xen:if is="{$renderedChildren} AND {$level} == 2">
         <div class="subForumsPopup">
     
             <div class="subForumsMenu">
                 <ol class="secondaryContent blockLinksList">
                 <xen:foreach loop="$renderedChildren" value="$child">
                     {xen:raw $child}
                 </xen:foreach>
                 </ol>
             </div>
         </div>
     </xen:if>
  5. Open template node_forum_level_n
    Replace all content with:
    PHP:
    <li class="node forum level-n node_{$forum.node_id}">
         <span class="dot"><span></span></span>
         <div {xen:if $forum.hasNew, 'class="unread"'}>
             <h4 class="nodeTitle"><a href="{xen:link forums, $forum}" class="menuRow">{$forum.title}</a></h4>
         </div>
         <xen:if is="{$renderedChildren}">
             <ol>
                 <xen:foreach loop="$renderedChildren" value="$child">
                     {xen:raw $child}
                 </xen:foreach>
             </ol>
         </xen:if>
     </li>
  6. Open node_category_level_n
    Replace all content with:
    PHP:
    <li class="node category level-n node_{$category.node_id}">
         <span class="dot"><span></span></span>
         <div {xen:if $category.hasNew, 'class="unread"'}>
             <h4 class="nodeTitle"><a href="{xen:link categories, $category}" class="menuRow">{$category.title}</a></h4>
         </div>
         <xen:if is="{$renderedChildren}">
             <ol>
                 <xen:foreach loop="$renderedChildren" value="$child">
                     {xen:raw $child}
                 </xen:foreach>
             </ol>
         </xen:if>
     </li>
  7. Open template EXTRA.css.
    Add there:

    Code:
    .subForumsPopup,
    .subForumsPopup .blockLinksList,
    .subForumsPopup ol,
    .subForumsMenu ol li ol li
    {
        width: 100%;
    }
    
    .subForumsPopup .blockLinksList
    {
        float: left;
    }
    
    .subForumsPopup .dot
    {
        position: relative;
        float: left; /* firefox fix */
    }
    .subForumsPopup .dot span
    {
        height: 0px;
        left: 6px;
        top: 10px !important;
        position: absolute;
        width: 0px;
        border: 2px solid @primaryLight;
        border-radius: 6px;
    }
    
    .subForumsMenu ol li
    {
        width: 25%;
        float: left;
    }
    
    .subForumsMenu .node .nodeTitle a
    {
        padding-left: 16px;
    }
    
    .subForumsMenu .node .node.level-n
    {
        display: none;
    }
Screenshot:

screenshot.PNG 
 

CFodder

Well-known member
#11
Can't seem to get the sub-forums to display in 2 columns, suspect it may be a template I've edited but I've reverted all the ones I thought it might be. Any help would be appreciated.

oldrsubforums.jpg

Cheers.