Home instead of Resources

Floren

Well-known member
Hi all,

I was wondering what I need to do in order to use the actual Home link, instead of Resources. My goal is to have the resources/ route point to the Home location, without showing the additional breadcrumb Home > Resources.

Thank you for your guidelines.
 
Last edited:
The only way really is to disable the home tab, and rename the Resources one to home.

That will most likely require a code edit though unless the phrase used on the Resources tab is separate to other usages of the phrase Resources.
 
Thanks Chris. I think there is a hook to control where the Resources tab shows (first, middle, last), will this allow me to force the Resources tab display before Forums? I'm going to replace the Resources tab title with already existing phrase Home, so that should fix the issue. I just need to know if there is a way to display the new Home tab before Forums.
 
Yeah the file to edit it:

library/XenResource/Listener/Template.php

Head to Line 102 which from there is:

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' => 'middle',
                'linksTemplate' => 'resources_tab_links'
            );
        }
    }

As you need to edit the file anyway, first, you might want to just change the used phrase so change:
PHP:
                'title' => new XenForo_Phrase('resources'),

to:
PHP:
                'title' => new XenForo_Phrase('home'),

Then change:
PHP:
                'position' => 'middle',

to:
PHP:
                'position' => 'home',

End result:

upload_2014-2-1_20-40-27.webp
 
Top Bottom