How to add a new button to the header?

knowledge base and frequently asked questions
Post Reply
User avatar
leo
admin
Posts: 4320
Joined: Sun Dec 13, 2009 8:27 am
Location: Hungary

How to add a new button to the header?

Post by leo » Wed Jun 22, 2011 1:05 pm

So, if you would like to add a new button to the navigation bar in the header (where the other buttons are located) to have a link back to your home page or your forum, you have to edit some files.

1. open /catalog/language/english/extension/navigation.php and add e.g.

Code: Select all

$_['text_myhomepage'] = 'My Home Page';
below

Code: Select all

$_['text_checkout'] = 'Checkout';
2. open /catalog/template/default/module/navigation.tpl and add

Code: Select all

<a href="http://www.mysite.com"><?php echo $text_myhomepage; ?></a>
below

Code: Select all

<a href="<?php echo $checkout; ?>"><?php echo $text_checkout; ?></a>
3. open /catalog/extension/module/navigation.php and add

Code: Select all

$view->set('text_myhomepage', $language->get('text_myhomepage'));
below

Code: Select all

$view->set('text_checkout', $language->get('text_checkout'));
4. change the width of #bar in the default css files if needed.

Before:
new_button_before.png
new_button_before.png (8.87 KiB) Viewed 15690 times
After:
new_button_after.png
new_button_after.png (8.9 KiB) Viewed 15690 times

Post Reply