Remove/edit items in nav bar
I am using the template Emeralda on my site (http://www.livingtowers.com/coopstore) and I would like to edit or remove some of the options in the nav bar along the top. Right now you'll see there is Home - New Products - Specials - Featured Products - My Account. Where can I a) change these titles and b) change the page it goes to when you click it.
Thanks to EVERYONE for their help so far. The store has been running now for a little over a week and is doing exactly what I want it too. I have one or two small modules to install but it is almost complete!
Re: Remove/edit items in nav bar
If this is similar to other templates by 12leaves, then the header navigation elements are in:
includes/templates/emerelda/templates/tpl_top_nav.php
Re: Remove/edit items in nav bar
Sadly that file doesn't exist. Any other suggestions?
Re: Remove/edit items in nav bar
Use the Developers Toolkit to search for: header_bar_ls_active
I found that by looking at the raw HTML "source" of your page (I used Firebug in Firefox, but Chrome/Safari have an "Inspect" option as well) and seeing what div your menu is contained in. Chances are you'll find that id mentioned in your templates, thus it'll be something that'll show up by searching for it.
Re: Remove/edit items in nav bar
Thanks! HTML and CSS are still very new to me but I will search for that and attempt to edit in the morning.
Re: Remove/edit items in nav bar
The menu bar is in:
includes/templates/emeralda/common/tpl_header.php .
The code that is relevant is:-
HTML Code:
<!--bof-header navigation bar display-->
<div id="header_bar">
<div id="header_bar_ls<?php if ($this_is_home_page) { ?>_active<?php } ?>"><a href="<?php echo HTTP_SERVER . DIR_WS_CATALOG; ?>"><?php echo HEADER_TITLE_CATALOG; ?></a></div>
<ul id="nav_bar_content">
<li><?php echo zen_image($template->get_template_dir('nav_delim.gif', DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . 'nav_delim.gif', ''); ?></li>
<?php
if ($current_page_base == 'products_new') $products_new_page='item_active'; else $products_new_page = 'products_new';
if ($current_page_base == 'specials') $specials_page = 'item_active'; else $specials_page = 'products_specials';
if ($current_page_base == 'featured_products') $featured_products_page = 'item_active'; else $featured_products_page='products_featured';
if ($current_page_base == 'account' || $current_page_base == 'login' || $current_page_base == 'account_edit' || $current_page_base == 'address_book' || $current_page_base == 'account_password' || $current_page_base == 'account_newsletters' || $current_page_base == 'account_notifications') $account_page = 'item_active'; else $account_page = 'account';
?>
<li id="<?php echo $products_new_page;?>"><a href="index.php?main_page=products_new"><?php echo HEADER_NEW_PRODUCTS;?></a></li>
<li><?php echo zen_image($template->get_template_dir('nav_delim.gif', DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . 'nav_delim.gif', ''); ?></li>
<li id="<?php echo $specials_page;?>"><a href="index.php?main_page=specials"><?php echo HEADER_SPECIALS;?></a></li>
<li><?php echo zen_image($template->get_template_dir('nav_delim.gif', DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . 'nav_delim.gif', ''); ?></li>
<li id="<?php echo $featured_products_page;?>"><a href="index.php?main_page=featured_products"><?php echo HEADER_FEATURED_PRODUCTS;?></a></li>
<li><?php echo zen_image($template->get_template_dir('nav_delim.gif', DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . 'nav_delim.gif', ''); ?></li>
<li id="<?php echo $account_page;?>"><a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_MY_ACCOUNT;?></a></li>
</ul>
<div id="header_bar_rs"></div>
<div id="navMainSearch">
<?php
$content = "";
$content .= zen_draw_form('quick_find_header', zen_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get');
$content .= zen_draw_hidden_field('main_page',FILENAME_ADVANCED_SEARCH_RESULT);
$content .= zen_draw_hidden_field('search_in_description', '1') . zen_hide_session_id();
$content .= '<input class="button-search-header float-left" type="image" src="' . $template->get_template_dir('', DIR_WS_TEMPLATE, $current_page_base,'images') . '/search_button.png' . '" value="Search" /><div class="input_div">'. zen_draw_input_field('keyword', '', 'size="6" maxlength="30" style="width: 142px" class="search_input" value="' . HEADER_SEARCH_DEFAULT_TEXT . '" onfocus="if (this.value == \'' . HEADER_SEARCH_DEFAULT_TEXT . '\') this.value = \'\';" onblur="if (this.value == \'\') this.value = \'' . HEADER_SEARCH_DEFAULT_TEXT . '\';"').'</div>';
$content .= "</form>";
echo($content);
?>
</div>
</div>
<!--eof-header navigation bar display-->
Re: Remove/edit items in nav bar
If I wanted to change the text from "Specials" to "Household" what would I need to change?
Am I right in assuming that I replace the bold text below with the URL to Household page?
<li id="<?php echo $specials_page;?>"><a href="index.php?main_page=specials"><?php echo HEADER_SPECIALS;?></a></li>
Re: Remove/edit items in nav bar
Quote:
Originally Posted by
DeeL
If I wanted to change the text from "Specials" to "Household" what would I need to change?
Am I right in assuming that I replace the bold text below with the URL to Household page?
<li id="<?php echo $specials_page;?>"><a href="index.php?main_page=specials"><?php echo HEADER_SPECIALS;?></a></li>
No. You would find the definition for HEADER_SPECIALS in your language files, and update that text there.
Re: Remove/edit items in nav bar
Thanks. I apologize now for not getting this, it's all still very new to me but I am trying to learn! I found the file and have successfully changed the text that appears in the nav bar (in admin.../includes/languages/emeralda/english.php._ However I am not sure what I need to change to change the page it goes to when it is clicked.
Below are the locations "HEADER_SPECIALS" appears.
/home/content/78/10039978/html/coopstore/adminu.../includes/languages/emeralda/english.php
Line #47 : define('HEADER_SPECIALS', 'Fruit');
/home/content/78/10039978/html/coopstore/adminu.../includes/templates/emeralda/common/tpl_header.php
Line #172 : <li id="<?php echo $specials_page;?>"><a href="index.php?main_page=specials"><?php echo HEADER_SPECIALS;?></a></li>
/home/content/78/10039978/html/coopstore/includes/languages/abby_template/english.php
Line #47 : define('HEADER_SPECIALS', 'Specials');
/home/content/78/10039978/html/coopstore/includes/languages/emeralda/english.php
Line #47 : define('HEADER_SPECIALS', 'Specials');
/home/content/78/10039978/html/coopstore/includes/templates/abby_template/common/tpl_header.php
Line #172 : <li id="<?php echo $specials_page;?>"><a href="index.php?main_page=specials"><?php echo HEADER_SPECIALS;?></a></li>
/home/content/78/10039978/html/coopstore/includes/templates/emeralda/common/tpl_header.php
Line #172 : <li id="<?php echo $specials_page;?>"><a href="index.php?main_page=specials"><?php echo HEADER_SPECIALS;?></a></li>
Re: Remove/edit items in nav bar
Quote:
Originally Posted by
DeeL
If I wanted to change the text from "Specials" to "Household" what would I need to change?
Am I right in assuming that I replace the bold text below with the URL to Household page?
<li id="<?php echo $specials_page;?>"><a href="index.php?main_page=specials"><?php echo HEADER_SPECIALS;?></a></li>
If your goal is to change the displayed text on the clickable link as seen by the customer from saying "Specials" (note the uppercase S ) to "Household" then no, you wouldn't touch the main_page=specials part, because all you indicated you wanted to change was the text displayed to the customer.
Since the text displayed to the customer is the part where <?php echo HEADER_SPECIALS; ?> is found, that means all you need to change is the language definition for HEADER_SPECIALS in the language file.
Now, if you're actually after something completely different such as adding a bunch of links to pages that don't already have names in Zen Cart, then the answer is very different because the question is actually different.
Can you please clarify what you're actually wanting to do?