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

XF 1.3 HR Alternative for Menu Dropdown?

Discussion in 'XenForo Questions and Support' started by CaptainMorgan, Jun 4, 2014.

  1. CaptainMorgan

    CaptainMorgan Active Member

    Here is the code I'm using in the navigation template.

            <!-- forums -->
            <xen:if is="{$tabs.forums}">
                <li class="navTab forums {xen:if $tabs.forums.selected, 'selected', 'Popup PopupControl PopupClosed'}">
                    <a href="{$tabs.forums.href}" class="navLink">Community</a>
                    <a href="{$tabs.forums.href}" class="SplitCtrl" rel="Menu"></a>
                    <div class="{xen:if {$tabs.forums.selected}, 'tabLinks', 'Menu JsOnly tabMenu'} forumsTabLinks">
                        <div class="primaryContent menuHeader">
                            <div class="muted">{xen:phrase quick_links}</div>
                        <ul class="secondaryContent blockLinksList">
                        <xen:hook name="navigation_tabs_forums">
                            <xen:if is="{$visitor.user_id}"><li><a href="{xen:link 'forums/-/mark-read', $forum, 'date={$serverTime}'}" class="OverlayTrigger">{xen:phrase mark_forums_read}</a></li></xen:if>
                            <xen:if is="{$canSearch}"><li><a href="{xen:link search, '', 'type=post'}">{xen:phrase search_forums}</a></li></xen:if>
                            <xen:if is="{$visitor.user_id}">
                                <li><a href="{xen:link 'watched/forums'}">{xen:phrase watched_forums}</a></li>              
                            <li><a href="{xen:link 'find-new/posts'}" rel="nofollow">{xen:if $visitor.user_id, {xen:phrase new_posts}, {xen:phrase recent_posts}}</a></li>
                        <hr />
                        <li><a href="{xen:link 'help/Medals'}">Medals</a></li>
                        <li><a href="{$tabs.members.href}" class="navLink">{$tabs.members.title}</a></li>
                        <li><a href="{xen:link 'memberMap'}">User Map</a></li>
    On hovering over the menu item, it does what it's supposed to do:

    But when in this case Forums or Community is selected and landed on, the view is this:

    Thus the hr breaks the quick links area when landed on... do you have any suggestions on how to fix this?
  2. HWS

    HWS Well-Known Member

    The solution is simple:
    Use a conditional to only include the HR if the submenu is in a dropdown.
  3. CaptainMorgan

    CaptainMorgan Active Member

    Do you have an example? Sorry I'm new to this... Thanks
  4. HWS

    HWS Well-Known Member

    For example (there are several different ways):
    <xen:if is="!{$tabs.forums.selected}"><hr /></xen:if>
  5. CaptainMorgan

    CaptainMorgan Active Member

    Thank you!

Share This Page