If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Templates, Stylesheets, Page Layout / is there any way to just remove the navigation links from the search area?

is there any way to just remove the navigation links from the search area?

Started by icwater on 10 Dec 2012, 7:06 PM · Views: 2,244

Results 1 to 17 of 17
10 Dec 2012, 7:06 PM
#1
icwater avatar

icwater

New Zenner

Join Date:
Nov 2012
Posts:
50
Plugin Contributions:
0

Post #1 by icwater

i want the search box but not the links that are attached to it. was wondering the easiest way to do this? thanks :smile:

10 Dec 2012, 7:40 PM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Post #4 by gjh42

That is a fully custom header, so the stock answer would have been irrelevant.
The search and top-nav are separate elements under a wrapper, so look in (probably) /includes/templates/your_template/common/tpl_header.php for a section like this:

<div class="wrapper box2">
						<!-- ========== MENU ========== -->
																		<div id="nav-cat"> 

You should be able to eliminate the nav items or the whole menu there.

10 Dec 2012, 8:31 PM
#5
icwater avatar

icwater

New Zenner

Join Date:
Nov 2012
Posts:
50
Plugin Contributions:
0

Post #5 by icwater

i'm not very php savvy, what part would i remove from this?

<div class="wrapper box2">
					
							<!-- ========== MENU ========== -->
									<?php if (EZPAGES_STATUS_HEADER == '1' or (EZPAGES_STATUS_HEADER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])))) { ?>
										<?php require($template->get_template_dir('tpl_ezpages_bar_header.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_ezpages_bar_header.php'); ?>
									<?php } ?>
							<!-- ========================== -->
10 Dec 2012, 8:46 PM
#6
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Post #6 by gjh42

It wasn't apparent from the output (TM decided the class/id tags should be changed from the stock version) but this seems to be the ez-pages header menu being used for these links. You should be able to turn it off in Configuration > EZ-Pages Settings > EZ-Pages Display Status - HeaderBar.

10 Dec 2012, 9:06 PM
#7
icwater avatar

icwater

New Zenner

Join Date:
Nov 2012
Posts:
50
Plugin Contributions:
0

Post #7 by icwater

that seems to disable the search box as well which i actually still want. just don't want the redundant navigation links that go with it. thanks for the help ;)

10 Dec 2012, 9:24 PM
#8
icwater avatar

icwater

New Zenner

Join Date:
Nov 2012
Posts:
50
Plugin Contributions:
0

Post #8 by icwater

oh wait that removed all the navigation in the header. i just want the small nav links that are plan text under and over the search bar removed. i want the main header navigation to stay. one sec i'll post a screen shot.

10 Dec 2012, 9:29 PM
#9
icwater avatar

icwater

New Zenner

Join Date:
Nov 2012
Posts:
50
Plugin Contributions:
0

Post #9 by icwater

10 Dec 2012, 9:31 PM
#10
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Post #10 by gjh42

Maybe there is something relevant in tpl_ezpages_bar_header.php.

What code builds this section in tpl_header.php?```

<div class="right-head"> <div class="wrapper"> <div class="search"> <!-- ========== SEARCH ========== --> <form name="quick_find_header" action="http://raptorengines.com/index.php?main_page=advanced_search_result" method="get"> <div> <input type="hidden" name="main_page" value="advanced_search_result" /><input type="hidden" name="search_in_description" value="1" /> <span class="corner"></span> <input type="text" name="keyword" class="input1" /> <input type="image" src="includes/templates/raptor/buttons/english/search.gif" alt="Search" title=" Search " class="input2" />
								</div>
							</form>
						<!-- ============================ -->
					</div>
					<div class="navigation">
						<!-- ========== NAVIGATION LINKS ========== -->								
10 Dec 2012, 9:36 PM
#11
icwater avatar

icwater

New Zenner

Join Date:
Nov 2012
Posts:
50
Plugin Contributions:
0

Post #11 by icwater

this is the tpl_ezpages_bar_header.php code. not sure if i get the question

<?php

/**

 * Page Template

 *

 * Displays EZ-Pages Header-Bar content.<br />

 *

 * @package templateSystem

 * @copyright Copyright 2003-2006 Zen Cart Development Team

 * @copyright Portions Copyright 2003 osCommerce

 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0

 * @version $Id: tpl_ezpages_bar_header.php 3377 2006-04-05 04:43:11Z ajeh $

 */



  /**

   * require code to show EZ-Pages list

   */

  include(DIR_WS_MODULES . zen_get_module_directory('ezpages_bar_header.php'));

?>

<?php if (sizeof($var_linksList) >= 1) { ?>

<div id="nav-cat"> 

<div id="level1"> 

  <ul> 

    <?php 

	$count = 1;

        foreach($var_linksList as $list) { 

            $link_list = substr($list['link'], strrpos($list['link'], '/')); 

            $link_referer = str_replace('&', '&', $_SERVER['REQUEST_URI']); 

			$link_referer = substr($link_referer, strrpos($link_referer, '/'));

			

			

            if($link_list == $link_referer){ 

                $class = 'selected'; 

            }else{ 

                $class = ''; 

            } 

            if($this_is_home_page && strpos($link_list, 'main_page=index')){ 

                $class = 'selected'; 

            } 

           if(!next($var_linksList)){

				$last = 'last';

			}

			else $last = ''; 

			if($count == 1){

				$first = 'first';

			}

			else $first = ''; 

            echo ' 

                <li class="' . $class . ' '.$last.' '.$first.'"> 

                    <a href="' . $list['link'] . '"> 

						<span class="corner"></span>

                        <span> 

                            <span>' . $list['name'] . '</span> 

                        </span> 

                    </a> 

                </li> 

            '; 

			$count ++;

        } 

       ?> 

  </ul> 

</div>

</div>

</div>

<?php } ?>
10 Dec 2012, 11:49 PM
#13
icwater avatar

icwater

New Zenner

Join Date:
Nov 2012
Posts:
50
Plugin Contributions:
0

Post #13 by icwater

sorry i'm just not sure what exactly i'm looking for here

<?php
/**
 * Common Template - tpl_header.php
 *
 * this file can be copied to /templates/your_template_dir/pagename<br />
 * example: to override the privacy page<br />
 * make a directory /templates/my_template/privacy<br />
 * copy /templates/templates_defaults/common/tpl_footer.php to /templates/my_template/privacy/tpl_header.php<br />
 * to override the global settings and turn off the footer un-comment the following line:<br />
 * <br />
 * $flag_disable_header = true;<br />
 *
 * @package templateSystem
 * @copyright Copyright 2003-2006 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_header.php 4813 2006-10-23 02:13:53Z drbyte $
 */
?>
<?php

	
  // Display all header alerts via messageStack:
  if ($messageStack->size('header') > 0) {
    echo $messageStack->output('header');
  }
  if (isset($_GET['error_message']) && zen_not_null($_GET['error_message'])) {
  echo htmlspecialchars(urldecode($_GET['error_message']));
  }
  if (isset($_GET['info_message']) && zen_not_null($_GET['info_message'])) {
   echo htmlspecialchars($_GET['info_message']);
} else {

}
?>


<?php
if (!isset($flag_disable_header) || !$flag_disable_header) {
?>

<div id="header">
	<div class="header-inner">
		<div class="main-width">
			<div class="wrapper">
				<div class="logo">
					<!-- ========== LOGO ========== -->
						<a href="<?php echo zen_href_link(FILENAME_DEFAULT);?>"><?php echo zen_image(DIR_WS_TEMPLATE.'images/logo.png'); ?></a>
					<!-- ========================== -->
				</div>
				<div class="right-head">
					<div class="wrapper">
						<div class="search">
							<!-- ========== SEARCH ========== -->
								<?php echo zen_draw_form('quick_find_header', zen_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get');?>
									<div>
								<?php 
									echo zen_draw_hidden_field('main_page',FILENAME_ADVANCED_SEARCH_RESULT);
									echo zen_draw_hidden_field('search_in_description', '1') . zen_hide_session_id();
								?>
								
								<span class="corner"></span>
								<?php echo zen_draw_input_field('keyword', '', 'class="input1"');?>
								<?php echo zen_image_submit ('search.gif', HEADER_SEARCH_BUTTON, 'class="input2" ');?>
								
								
									</div>
								</form>
							<!-- ============================ -->
						</div>
						<div class="navigation">
							<!-- ========== NAVIGATION LINKS ========== -->								
								
							<!-- ====================================== -->
						</div>
					</div>
					<div class="wrapper box2">
					
							<!-- ========== MENU ========== -->
									<?php if (EZPAGES_STATUS_HEADER == '1' or (EZPAGES_STATUS_HEADER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])))) { ?>
										<?php require($template->get_template_dir('tpl_ezpages_bar_header.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_ezpages_bar_header.php'); ?>
									<?php } ?>
							<!-- ========================== -->
						
					</div>
				</div>
			</div>
		</div>
	</div>
</div>

    
	<?php 
		if (HEADER_SALES_TEXT != '' || (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2))) {
			if (HEADER_SALES_TEXT != '') {
	?>
        		<div id="tagline"><?php echo HEADER_SALES_TEXT;?></div>
	<?php
    		}
		}
	?>
   
                
    
11 Dec 2012, 12:08 AM
#14
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Post #14 by gjh42

The file you show doesn't have the ability to affect the search box with ez-pages settings. It also doesn't have the ability to display the nav links more than once. Is there another section below this which mentions tpl_ezpages_bar_header.php?

You should be able to comment out the three PHP statements with // like this ```php
<!-- ========== MENU ========== -->
<?php //if (EZPAGES_STATUS_HEADER == '1' or (EZPAGES_STATUS_HEADER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])))) { ?>
<?php //require($template->get_template_dir('tpl_ezpages_bar_header.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_ezpages_bar_header.php'); ?>
<?php //} ?>
<!-- ========================== -->

11 Dec 2012, 12:11 AM
#15
icwater avatar

icwater

New Zenner

Join Date:
Nov 2012
Posts:
50
Plugin Contributions:
0

Post #15 by icwater

ok ran across another thread about the positioning of this box. so i did this

#header .box2{
	overflow: hidden;
	margin-top: -56px;
	float: right;
	text-align: right;
	padding: 10px 0 0 0;
	visibility: hidden;

"visibility: hidden;" seems to have done the trick. am i going to run into any issues with fixing it like that?

thanks again.

11 Dec 2012, 12:16 AM
#16
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Post #16 by gjh42

Technically, hiding page elements from human view could be seen by search engines as "black hat" manipulation. I believe they do understand some "styling-type" hiding vs. "manipulation-type" hiding, but it is still better where practical to eliminate processing of unwanted elements instead of processing, sending and then hiding them.

11 Dec 2012, 12:25 AM
#17
icwater avatar

icwater

New Zenner

Join Date:
Nov 2012
Posts:
50
Plugin Contributions:
0

Post #17 by icwater

thank you, i appreciate all the help.