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

XF 1.1 Need help with navigation

Discussion in 'XenForo Questions and Support' started by Matthew Hawley, Jan 21, 2013.

  1. Matthew Hawley

    Matthew Hawley Well-Known Member

    Okay so, what I want to do is, remove the nav tab of different addons, BUT i dont want to remove the tablinks.
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    The secondary links underneath a tab are bound to that tab. If you hide the parent tab then the secondary links will be gone too.

    One option is to hide the tab when it's not selected. See this post:

    http://xenforo.com/community/threads/move-menu-items.20654/#post-263851

    If you can provide more information about exactly what you want to accomplish then I can try to help.
     
  3. Matthew Hawley

    Matthew Hawley Well-Known Member

    Okay so i went to /library/XfRu/UserAlbums/EventListener/Tab.php and changed the linksTemplate to the EWRmedio one. So the tablinks that are on medio are displayed on useralbums too.

    I really just need the useralbums tab removed and when I'm on the index for useralbums I need the medio tab selected.

    I also need to know the linksTemplate code for the forum homepage.

    Code:
    <?php
    /**
    * XenForo User Albums
    *
    * @category XenForo Application
    * @package    XfRu_UserAlbums
    * @copyright  Copyright (c) 2010 XF-Russia. (http://www.xf-russia.ru)
    * @license
    * @version  $Id: Tab.php 186 2011-04-03 13:47:51Z pepelac $ $Date: 2011-04-03 15:47:51 +0200 (Sun, 03 Apr 2011) $ $Revision: 186 $
    * @author Pepelac
    *
    */
     
    class XfRu_UserAlbums_EventListener_Tab
     
    {
        public static function addTab(array &$extraTabs, $selected)
        {
            if (XfRu_UserAlbums_Permissions::canViewAlbums())
            {
                if (!XenForo_Visitor::getUserId() && XenForo_Application::get('options')->XfRu_UA_hideMenuTabToGuests)
                {
                    return;
                }
                $extraTabs['useralbums'] =array(
                    'title' => new XenForo_Phrase('xfr_useralbums_user_albums'),
                    'href' =>  XenForo_Link::buildPublicLink('useralbums'),
                    'position' => 'middle',
                    'selected' => ($selected == 'useralbums'),
                    'linksTemplate' => 'EWRmedio_Navtabs',
                );
            }
        }
    }
     
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  5. Matthew Hawley

    Matthew Hawley Well-Known Member

    No thats not exactly what I want..
     

    Attached Files:

  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  7. Matthew Hawley

    Matthew Hawley Well-Known Member

    No no, I already have it.

    I don't want to put links in the drop-down. I just need to remove an addon's tab, and when Im on that addon's index I need another tab to be selected.
     
  8. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  9. Matthew Hawley

    Matthew Hawley Well-Known Member

  10. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  11. Matthew Hawley

    Matthew Hawley Well-Known Member

  12. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    In the source code. Example:

    Code:
    <li class="navTab members Popup PopupControl PopupClosed">
    
     
  13. Matthew Hawley

    Matthew Hawley Well-Known Member

    Figured it all out! :) Thanks!
     

Share This Page