PDA

View Full Version : How to add new item in the top navigation menu


Sergey Ten
02-06-2007, 03:43 PM
[ Open your templates/your_template/Layout.php ]
[ Find function "print_menu" ]


$menu['home']['caption'] = $gDirLang['home'];
$menu['home']['url'] = "{$gDirConfig['base']}{$gDirConfig['dir']}";
$menu['search']['caption'] = $gDirLang['search'];
$menu['search']['url'] = "{$gDirConfig['base']}{$gDirConfig['dir']}search.php";
$menu['new-links']['caption'] = $gDirLang['new_links'];
$menu['new-links']['url'] = "{$gDirConfig['base']}{$gDirConfig['dir']}new-links.html";
$menu['top-links']['caption'] = $gDirLang['top_links'];
$menu['top-links']['url'] = "{$gDirConfig['base']}{$gDirConfig['dir']}top-links.html";
$menu['popular-links']['caption'] = $gDirLang['popular_links'];
$menu['popular-links']['url'] = "{$gDirConfig['base']}{$gDirConfig['dir']}popular-links.html";
if ($aCategory)
{
$menu['suggest-link']['caption'] = $gDirLang['suggest_link'];
$menu['suggest-link']['url'] = "{$gDirConfig['base']}{$gDirConfig['dir']}suggest-link.php?id={$aCategory}";
$menu['suggest-category']['caption'] = $gDirLang['suggest_category'];
$menu['suggest-category']['url'] = "{$gDirConfig['base']}{$gDirConfig['dir']}suggest-category.php?id={$aCategory}";
}


If you want add new item to menu, just add following code:


$menu['my_item']['caption'] = 'My new item';
$menu['my_item']['url'] = "{$gDirConfig['base']}{$gDirConfig['dir']}my_new_item.php";


[ Save changes ]

It is for FREE version.

Sergey Ten
03-15-2007, 09:22 AM
For PRO 2.1

[ Open your template/your_template/Layout.php ]
[ Find function print_menu ]


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

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


[ After add code ]


$menu['random-links']['caption'] = 'Your caption';
$menu['random-links']['url'] = 'Your_file_name';


[ Save change ]

Patsy
05-13-2007, 01:44 PM
I'm also wanting to make some changes and to be sure I'm going in the right direction........ to disable an item -- do I simply put // in front of the statement?

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

where do I put the // on these 2 lines (I'm assuming they both drive the "HOME" hyperlink).

Also, I want to add an item called "Listing FAQ" -- will this handle it?

$menu['Listing FAQ']['caption'] = $gDirLang['listingfaq'];
$menu['listing_faq']['www.ncfsearch.com/directory/faq.html'] = $url;

Thanks for your help!
Patsy

Patsy
05-13-2007, 07:18 PM
I used the // and disabled the menu selections I don't need but, for the life of me I can't add anything to the menu bar.

Thanks,
Patsy

Sergey Ten
05-15-2007, 09:43 AM
Hello Patsy

What version do you use?

Patsy
05-16-2007, 10:23 PM
Oops... I did leave that out, didn't I? Sorry! Am using Pro V2.1.03

Patsy

Sergey Ten
05-18-2007, 06:42 AM
Hello Patsy

You could use the "Manage Pages" in the admin panel.
Admin Panel » Manage Pages » Add

Patsy
05-19-2007, 11:02 PM
Thanks -- after creating the page, how do I add it to my top menu bar? Also, I'd like to change "suggest link" to "add link" if it's simple.

Patsy

Patsy
05-19-2007, 11:35 PM
Just changed the Suggest Link to Add Link. So now it's down to creating a new page and figuring out how to get it in the top menu bar.

Patsy

Updated:
And now I have that -- after reading the manual docs for the 10th time! 84 pages is long but jammed packed with good information!