Post by pbenfield » Sun May 29, 2011 8:25 pm

I wanted to move the the menu bar special, bookmark. contact and sitemap to appear on the left side of the language and currency bar. It just looks better!. I am no PHP expert just html and css. if you would like to do this here are the steps in 1.4.9.4 I am not sure about other versions.

First the position and layout of this bar is dependent on the css description so first we must change this by adding a new class.

in catalog\view\theme\default(your cart name\stylesheet\stylesheetcss you will find

Code: Select all

#header .div3 {
	float: right;
	padding-top: 7px;
	height: 38px;
}
#header .div3 a {
	margin-left: 15px;
	padding: 1px 0px 2px 20px;
	background-repeat: no-repeat;
	background-position: left center;
}

add under this the new style

Code: Select all


#header .div33 {
	float: left;
	padding-top: 7px;
	height: 38px;
}
#header .div33 a {
	margin-left: 15px;
	padding: 1px 0px 2px 20px;
	background-repeat: no-repeat;
	background-position: left center;
}
Note: You can also make it appear right of the currency by changing float: left to float: right

Now we have to go to the header.tpl to adjust the position of the menubar

catalog\view\theme\default(name of your theme\template\common\header.tpl

look for the following code:

Code: Select all

  <div class="div6">
    <div class="left"></div>
    <div class="right"></div>
    <div class="center">
	  <?php if (isset($common_error)) { ?>
	  <div class="warning"><?php echo $common_error; ?></div>
	  <?php } ?>
      <div id="breadcrumb">
        <?php foreach ($breadcrumbs as $breadcrumb) { ?>
        <?php echo $breadcrumb['separator']; ?><a href="<?php echo str_replace('&', '&', $breadcrumb['href']); ?>"><?php echo $breadcrumb['text']; ?></a>
        <?php } ?>
      </div>
after this code add the following in preparation for the new menubar position

Code: Select all

  <div class="div33"></div> 
Look for the code

Code: Select all

	  	  	  <div class="div3"><a href="<?php echo str_replace('&', '&', $special); ?>" style="background-image: url('catalog/view/theme/default/image/special.png');"><?php echo $text_special; ?></a><a onclick="bookmark(document.location, '<?php echo addslashes($title); ?>');" style="background-image: url('catalog/view/theme/default/image/bookmark.png');"><?php echo $text_bookmark; ?></a><a href="<?php echo str_replace('&', '&', $contact); ?>" style="background-image: url('catalog/view/theme/default/image/contact.png');"><?php echo $text_contact; ?></a><a href="<?php echo str_replace('&', '&', $sitemap); ?>" style="background-image: url('catalog/view/theme/default/image/sitemap.png');"><?php echo $text_sitemap; ?></a></div>

Cut the code directly after the div ie <div class="div3"> and before its closed div after tthis ....echo $text_sitemap; ?></a>//here// </div> make sure you have the following still present <div class="div3"></div>


Now paste this betwenn the <div class="div33"></div>

You are nearly all set but to stop the tabs jumping to the top of the page you should add the following between the tags you have just cut from <div class="div3"></div>

Code: Select all


<p>&nbsp;</p><p>&nbsp;</p>

It is always important make a copy of the header.tpl in case you make an error.

I never believe in deleting or changing existing code that is why I have the new stylesheet "div33" and if you are chaning code in future always try keep the old code on the page as a comment.

Hope that all goes well

see http://www.online-biz-uk.co.uk
Last edited by pbenfield on Tue Jun 14, 2011 6:13 pm, edited 4 times in total.

New member

Posts

Joined
Wed Apr 20, 2011 3:43 pm

Post by m_saraga » Sat Jun 04, 2011 6:03 am

Fantastic modification; It really gives the standard template a much more "commercial" look, not to mention that your explanation and instructions were so clear, someone with no skills whatsoever -like me- can do it in less than 5 minutes!

Thanks a lot!

New member

Posts

Joined
Tue May 17, 2011 1:31 am
Location - Miami, FL US
Who is online

Users browsing this forum: Majestic-12 [Bot] and 3 guests