News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Back link in horz menu to home site

Started by domineaux, March 26, 2010, 07:44:03 PM

Previous topic - Next topic

domineaux

Using the default theme -  need a back link to home site from horz menu line on forum.




hadesflames


domineaux

#2
Following your tutor

When I follow the instructions for a simple button with a back link to home site.   There is an extra space added between the two menu items. 

When I move my cursor to the space I see the color background for the text link appx 2 pixels wide, which is what it should do.

Then I click it and it goes back to the home site correctly.

However, the name of the menu item does not show in the space between the two menu items.

Is there an additional entry required somewhere to allocate location for the additional button?  Everything thing seems to work correctly, just no menu item text.

In this case I used ----Home----Front----Help----- the Front doesn't show and there is not space only 1 pixel of space between Home and Help

Example---- Home---Help ----   when I move cursor to space between Home and Help background color shows in 1 or 2 pixels, and when I click it goes to home site.

This is the only edit I made in Subs.php

Quote
// All the buttons we can possible want and then some, try pulling the final list of buttons from cache first.
   if (($menu_buttons = cache_get_data('menu_buttons-' . implode('_', $user_info['groups']) . '-' . $user_info['language'], $cacheTime)) === null || time() - $cacheTime <= $modSettings['settings_updated'])
   {
      $buttons = array(
                    'home' => array(
            'title' => $txt['home'],
            'href' => $scripturl,
            'show' => true,
            'sub_buttons' => array(
            ),
            'is_last' => $context['right_to_left'],
            // 'target' => '_blank',
         ),
                  'front' => array(
            'title' => $txt['front'],
            'href' => 'http://mydomain.com/',
            'show' => true,
            'sub_buttons' => array(
            ),
            'is_last' => $context['right_to_left'],
            // 'target' => '_blank',
         ),

         'help' => array(
            'title' => $txt['help'],
            'href' => $scripturl . '?action=help',
            'show' => true,
            'sub_buttons' => array(
            ),
         ),

you can actually click the href link in the quote code and see the problem

--------------------------

I found problem I needed to also add a button in the Index.english.php on Themes/default/ folder.



Advertisement: