1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. 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.
    Dismiss Notice
  3. 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.

Custom Sub-Forum Menu's

Discussion in 'Template Modifications [Archive]' started by Russ, May 28, 2011.

  1. Russ

    Russ Well-Known Member

    As requested here

    Custom Sub-Forum Menu's

    First off if you've made any changes to node_forum_level_2 please back it up now
    :)
    All edits are in: node_forum_level_2

    We're going to hide the normal sub-forum menu right now
    1.) Find

    Code:
                    <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>
    
    
    Replace with:

    Code:
    
                <xen:if is="{$forum.node_id} != '2'">
                    <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>
                </xen:if>
    
    
    2 being the node-id you wish to hide the normal sub-forum menu in.

    Then add above the previous edit:

    Code:
    
                    <xen:if is="{$forum.node_id} == '2'">
                        <div class="Popup subForumsPopup">
                            <a href="{xen:link forums, $forum}" rel="Menu" class="cloaked" data-closemenu="true"><span class="dt">B:</span> 2</a>
    
                            <div class="Menu JsOnly subForumsMenu">
                                <div class="primaryContent menuHeader">
                                    <h3>B: Section</h3>
                                    <div class="muted">{xen:phrase sub_forums}</div>
                                </div>
                                <ol class="secondaryContent blockLinksList">
    <li><h4 class="nodeTitle"><a class="menuRow" href="index.php?forums/test/">Class 1</a></h4></li>
    <li><h4 class="nodeTitle"><a class="menuRow" href="index.php?forums/test/">Class 2</a></h4></li>
                                </ol>
                            </div>
                        </div>
                    </xen:if>
    
    
    This will basically create a custom drop down menu for Node 2, and then exclude the normal drop down menu for sub-forums on Node 2 as well. This will allow you to choose custom sub-forum options in the forum category.

    Example:
     

    Attached Files:

    Mujahid Taban and JVCode like this.
  2. Russ

    Russ Well-Known Member

    How to hide the normal sub-forum dropdown in multiple nodes?

    Find:
    Code:
                <xen:if is="{$forum.node_id} != '2'">
    
    Replace with:
    Code:
                <xen:if is="{$forum.node_id} != '2' AND {$forum.node_id} != '3'">
    
    You can add more nodes using: AND {$forum.node_id} != '3' as necessary.

    How to add more than one custom menu?


    Simply duplicate the 3rd set of code in the first page
     
    JVCode likes this.
  3. JVCode

    JVCode Well-Known Member

    Wow, that's damn near perfect to what I had in mind!

    I am eternally grateful for this help! it has helped me out alot!
     
  4. Russ

    Russ Well-Known Member

    FIXED STYLE ADJUSTMENT FOR NUMEROUS POP UPS

    Move all of your custom menus above this snippit:

    Code:
            <div class="nodeLastPost secondaryContent">
                <xen:if is="{$forum.lastPost.date}">
    
    That will include it in the node but start it on a new line, then add this into your extra.css:

    Code:
    .node_2 .subForumsPopup {
    padding: 5px;
    width: 20%;
    text-align: right;
    }
    .subForumPopupFix {
    padding-left: 5px;
    }
    
    Fix the node_# to the appropriate one you need

    Final step wrap all of your custom menus in this:

    Code:
    <div class="subForumPopupFix">
    menus here
    </div>
    xf2.png
     
  5. Russ

    Russ Well-Known Member

    Did you wrap all of the menus in that div I gave you?
     
  6. Russ

    Russ Well-Known Member

    Hold on, I got a fix give me just a bit :) I know what I did wrong, I need more sleep
     
    JVCode likes this.
  7. JVCode

    JVCode Well-Known Member

    I know I'm being a right pain in the grass, but can I get the number of sub-forums removed for this part? so it's just the sub-forum name without how many forums are listed within?
     
  8. Russ

    Russ Well-Known Member

    Not at all, for that just remove the 2 and the : before the span in the line

    Code:
                            <a href="{xen:link forums, $forum}" rel="Menu" class="cloaked" data-closemenu="true"><span class="dt">B:</span> 2</a
    
    getting the other code ready
     
    JVCode likes this.
  9. Russ

    Russ Well-Known Member


    Ok updated my post:

    in extra.css update the .node_2 .subForumsPopup {
    with the width and text-align, tell me how that goes, you can adjust the width depending on the size of everything.

    Code:
    .node_2 .subForumsPopup {
    padding: 5px;
    width: 20%;
     text-align: right;
    }
    
     
  10. Russ

    Russ Well-Known Member

    can you pm me a link to your board?
     
  11. Russ

    Russ Well-Known Member

    The

    Code:
    <div class="subForumPopupFix"> menus here </div>
    
    Almost looks like it's only placed around the first 5, positive the div is around ALL the menu's? Reason I ask is there's no padding on the leftside on the bottom columns

    PM me a copy of your node_forum_2, I can take a look.
     
  12. Russ

    Russ Well-Known Member

    My bad... :( I meant wrap one single code around all the menus, I'm not sure if that would effect it though... HMM
     
    JVCode likes this.
  13. JVCode

    JVCode Well-Known Member

    Just wrapped the whole code in those tags and the outcome is exactly the same as the image posted above.
     
  14. Russ

    Russ Well-Known Member

    PM'd you, only in chrome it's doing it:
    Place this above all the custom menus

    HTML:
    <div style="clear:both;"></div>
    
     
    JVCode likes this.
  15. JVCode

    JVCode Well-Known Member

    Have this working beautifully now just how I envisioned it, and has saved me shed lots of vertical scrolling space on the home page. Many thanks Russ.

    Capture.PNG
     
    Russ likes this.

Share This Page