Page 1 of 3 123 LastLast
Results 1 to 10 of 22
  1. #1
    Join Date
    Jan 2013
    Location
    Eustis, Florida, United States
    Posts
    84
    Plugin Contributions
    0

    Default 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!

  2. #2
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,263
    Plugin Contributions
    3

    Default 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
    20 years a Zencart User

  3. #3
    Join Date
    Jan 2013
    Location
    Eustis, Florida, United States
    Posts
    84
    Plugin Contributions
    0

    Default Re: Remove/edit items in nav bar

    Sadly that file doesn't exist. Any other suggestions?

  4. #4
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default 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.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Jan 2013
    Location
    Eustis, Florida, United States
    Posts
    84
    Plugin Contributions
    0

    Default 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.

  6. #6
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,263
    Plugin Contributions
    3

    Default 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-->
    20 years a Zencart User

  7. #7
    Join Date
    Jan 2013
    Location
    Eustis, Florida, United States
    Posts
    84
    Plugin Contributions
    0

    Default 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>

  8. #8
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Remove/edit items in nav bar

    Quote Originally Posted by DeeL View Post
    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.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  9. #9
    Join Date
    Jan 2013
    Location
    Eustis, Florida, United States
    Posts
    84
    Plugin Contributions
    0

    Default 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>

  10. #10
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Remove/edit items in nav bar

    Quote Originally Posted by DeeL View Post
    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?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. v151 Is it possible to remove right Nav Bar?
    By PetleyJ in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 10 Mar 2013, 11:16 AM
  2. Nav bar - How can i delete a heading in my Nav bar (v1.5.0)
    By Pretty dumb in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 8 Oct 2012, 02:07 PM
  3. HELP? Remove nav bar on TOP of page....
    By joyjoy in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 9 Sep 2010, 10:16 PM
  4. Replies: 1
    Last Post: 10 Jun 2009, 10:16 AM
  5. remove main nav bar
    By SarahMD in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 2 Aug 2008, 02:47 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR