PDA

View Full Version : How to add a tab to the top menu?


ok90
08-04-2007, 11:16 PM
Hello everyone,

I have searched the forums and found answers which got close but I still need some help. If anyone could help, I'd appreciate it.


I am on eSyndicat 2.1.03 and would like to add one tab at the end of the already five ones in the top menu.

1) The easiest way I understand is simply to go through Admin Panel > Manage Pages and add a New Page there and choose for it to appear in the top menu as per this picture:
http://img83.imageshack.us/my.php?image=picture2zd5.png

It did work but the new tab appeared on a second level below the first row of five tabs instead of going to the right of the 5th one.

2) So I edited the layout.php file as per this picture:
http://img299.imageshack.us/my.php?image=picture1rm6.png

but that had no visible effect even after closing the browser and relaunching a page with my site.


Does anyone know how to do this?

bfarrell
08-05-2007, 01:52 AM
Did you try to reduce the font size of the print within the existing tabs? See if that does not reduce the size of the tab, allowing for more room for an additional tab.

ok90
08-05-2007, 01:59 AM
I didn't, no. Could you please tell me how to do that? in CSS > Styles.css ?

Loren
08-05-2007, 10:56 AM
what template?

ok90
08-08-2007, 08:46 PM
I found the answer by playing with it.

I needed to add a tab with a link to my forums.



**** The original code in Layout.php:

function print_menu($aCategory = 0)
{
global $gDirLang;
global $gTab;
global $menus;

$config = &Config::instance();

$url = $config->get('base').$config->get('dir');

$menu['home']['caption'] = $gDirLang['home'];
$menu['home']['url'] = $url;

$menu['search']['caption'] = $gDirLang['search'];
$menu['search']['url'] = $url.'search.php';

$menu['new-links']['caption'] = $gDirLang['new_links'];
$menu['new-links']['url'] = $config->get('mod_rewrite') ? $url.'new-links.html' : $url.'listings.php?view=new';

// $menu['top-links']['caption'] = $gDirLang['top_links'];
// $menu['top-links']['url'] = $config->get('mod_rewrite') ? $url.'top-links.html' : $url.'listings.php?view=top';

$menu['popular-links']['caption'] = $gDirLang['popular_links'];
$menu['popular-links']['url'] = $config->get('mod_rewrite') ? $url.'popular-links.html' : $url.'listings.php?view=popular';

// $menu['random-links']['caption'] = $gDirLang['random_links'];
// $menu['random-links']['url'] = $config->get('mod_rewrite') ? $url.'random-links.html' : $url.'listings.php?view=random';

$menu['suggest-link']['caption'] = $gDirLang['suggest_link'];
$menu['suggest-link']['url'] = $url."suggest-link.php?id=".$aCategory;

if ($config->get('suggest_category'))
{
// $menu['suggest-category']['caption'] = $gDirLang['suggest_category'];
// $menu['suggest-category']['url'] = $url."suggest-category.php?id=".$aCategory;
}




**** I added this and it worked:
// $menu['forums']['caption'] = $gDirLang['forums'];
// $menu['forums']['url'] = $url.'http://myforums.com';


It worked because I added the
//
//

in front of each line. Without those slashes it was a no-go.



Thank you all for your help. I appreciate it.

Hope this helps someone.