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

XF 1.4 set RM to be at the Home-Tab position ?

Discussion in 'XenForo Questions and Support' started by erich37, Dec 24, 2014.

  1. erich37

    erich37 Well-Known Member

    I would like to put the RM at the Homepage.

    I have changed the "Index Page Route" towards resources/
    This is working fine.


    Question:
    How do I change the position of the Nav-items, so that "Resources"-Tab is at the left position, and the "Forums"-Tab is at the right-hand-side of the "Resources"-Tab ?


    change_nav_position.gif




    Many thanks!
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    You will likely need to enable debug mode and change the execution order.
     
  3. erich37

    erich37 Well-Known Member

    hmm....

    isn't there an easier way by showing the "Home"-Tab ?

    I guess it is some route-change stuff, but I do not remember anymore.....
     
  4. Bob

    Bob Well-Known Member

    edit the file: /library/XenResource/Listener/Template.php

    find this method at the bottom of the file and change the position from middle to home (as shown below)
    PHP:
        public static function navigationTabs(&$extraTabs$selectedTabId)
        {
            if (
    XenForo_Visitor::getInstance()->hasPermission('resource''view'))
            {
                
    $extraTabs['resources'] = array(
                    
    'title' => new XenForo_Phrase('resources'),
                    
    'href' => XenForo_Link::buildPublicLink('full:resources'),
                    
    'position' => 'home',
                    
    'linksTemplate' => 'resources_tab_links'
                
    );
            }
        }
    Selection_545.png

    normally, but not in this case as the "middle" position is between 'Forums' and "Members"

    The order is:
    <!-- home -->
    <!-- extra tabs: home -->
    <!-- forums -->
    <!-- extra tabs: middle -->
    <!-- members -->
    <!-- extra tabs: end -->
     
    Last edited: Dec 24, 2014
    51463, erich37 and Brogan like this.
  5. erich37

    erich37 Well-Known Member

  6. Bob

    Bob Well-Known Member

    Several addons are starting to include an option for this. I've added an option to most of mine. I nicked the idea from @Chris D & XFMG :)
    Selection_546.png
     
    erich37 and Chris D like this.
  7. erich37

    erich37 Well-Known Member

    I see.

    If 3rd-party Addons are having this option, then I think there should be also an option build into the RM (Resource Manager) in order to make this easier.

    But I guess/hope we will see this with XF 2.0

    :)
     
    flitigalisa likes this.

Share This Page