Logo/Search before menu and Add New Blocks

Hi,

Can you please see how to do this change by keeping the responsive. Attachment 31277

Thanks

5 answers

Profile photo of Sherlock 0.00 $tone November 8, 2013
Public

Hi mate,

To move the logo and search block to before menu you can open and modify the file of app\design\frontend\default\jm_booktemplate\page\ html\header.phtml
The html code for logo is

HTML Code:

<h1 id="logo"><a href="<?php echo $this->getUrl('') ?>" title="<?php echo $this->getLogoAlt() ?>" style="background-image: url(<?php echo $this->getLogoSrc() ?>);"><?php echo $this->getLogoAlt() ?></a></h1>

And for the search block

HTML Code:

 <!-- BEGIN: SITE SEARCH -->
			<div id="jm-search" class="has-toggle">
				<div class="btn-toggle search-toggle">
					<i class="icon-search"></i>
				</div>
				<div class="inner-toggle">
					<?php echo $this->getChildHtml('topSearch') ?>
				</div>
			</div>
			<!-- END: SITE SEARCH -->

I believe you can implement this yourself mate

#1
Profile photo of Jayasri Ruwanpura 0.00 $tone November 8, 2013
Public

Hi,

Mate its normally with the header.phtml file.is it any move of divs?

?>
<script type="text/javascript">
jQuery(window).load(function(){
if (jQuery(‘#jm-mainbody’).children().hasClass("col-left")){
jQuery("div#jm-mainbody > div").equalHeight();
}
jQuery(".megacol").not(".last").equalHeight();

})
</script>
?>
<div class="main">
<div class="inner clearfix">
<h1 id="logo"><a href="<?php echo $this->getUrl(”) ?>" title="<?php echo $this->getLogoAlt() ?>" style="background-image: url(<?php echo $this->getLogoSrc() ?>);"><?php echo $this->getLogoAlt() ?></a></h1>
<p class="no-display"><a href="#main"><strong><?php echo $this->__(‘Skip to Main Content’) ?> &raquo;</strong></a></p>

<div id="mainnav-inner">
<!-- BEGIN: NAV -->
<div id="jm-mainnav" class="has-toggle">
<div class="btn-toggle menu-toggle" >
<i class="icon-reorder">&nbsp;</i>
</div>
<div class="inner-toggle" id="jm-mainnav-inner">
<?php echo $this->getChildHtml(‘topMenu’) ?>
</div>
</div>
<!-- END: NAV -->
<!-- BEGIN: SITE SEARCH -->
<div id="jm-search" class="has-toggle">
<div class="btn-toggle search-toggle">
<i class="icon-search"></i>
</div>
<div class="inner-toggle">
<?php echo $this->getChildHtml(‘topSearch’) ?>
</div>
</div>
</div>
<!-- END: SITE SEARCH -->
</div>
</div>

#2
Profile photo of Sherlock 0.00 $tone November 8, 2013
Public

Hi mate,

Here are the file’s normal content

PHP Code:

<?php
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to [email protected] so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magentocommerce.com for more information.
 *
 * egory   design_default
 * @package    Mage
 * Copyright (c) 2008 Irubin Consulting Inc. DBA Varien ([url]http://www.varien.com[/url])
 * @license    [url]http://opensource.org/licenses/afl-3.0.php[/url]  Academic Free License (AFL 3.0)
 */
?>    
<script type="text/javascript">
   jQuery(window).load(function(){
        if (jQuery('#jm-mainbody').children().hasClass("col-left")){
            jQuery("div#jm-mainbody > div").equalHeight();
        }
        jQuery(".megacol").not(".last").equalHeight();
    
})
</script>
<div class="main">
    <div class="inner clearfix">
        <h1 id="logo"><a href="<?php echo $this->getUrl(''?>" title="<?php echo $this->getLogoAlt() ?>" style="background-image: url(<?php echo $this->getLogoSrc() ?>);"><?php echo $this->getLogoAlt() ?></a></h1>
        <p class="no-display"><a href="#main"><strong><?php echo $this->__('Skip to Main Content'?> &raquo;</strong></a></p>
        
        <div id="mainnav-inner">
            <!-- BEGIN: SITE SEARCH -->
            <div id="jm-search" class="has-toggle">
                <div class="btn-toggle search-toggle">
                    <i class="icon-search"></i>
                </div>
                <div class="inner-toggle">
                    <?php echo $this->getChildHtml('topSearch'?>
                </div>
            </div>
            <!-- END: SITE SEARCH -->
            <!-- BEGIN: NAV -->
            <div id="jm-mainnav" class="has-toggle">
                <div class="btn-toggle menu-toggle" >
                     <i class="icon-reorder">&nbsp;</i>
                </div>                
                <div class="inner-toggle" id="jm-mainnav-inner">
                    <?php echo $this->getChildHtml('topMenu'?>
                </div>
            </div>
            <!-- END: NAV -->
        </div>
        
    </div>
</div>

#3
Profile photo of Sherlock 0.00 $tone November 12, 2013
Public

Hi mate,

To place two static blocks to above the slideshow you can try as follow
1) open the layout file of app\design\frontend\default\jm_book\layout\page.xm l there you would see this block tag

HTML Code:

 <block type="core/text_list" name="tops1" as="tops1" translate="label">
                <label>Content Top 1</label>
            </block>

Right above it you add this

HTML Code:

 <block type="core/text_list" name="tops0" as="tops0" translate="label">
                <label>Content Top 1</label>
            </block>

2) Go to your back-end to edit your home cms page, there at the Layout Update XML field you would see this

HTML Code:

 <reference name="tops1">
				<block type="cms/block" name="position-2">
					<action method="setBlockId"><block_id>position-2</block_id></action>
				</block>
				<block type="cms/block" name="position-3">
					<action method="setBlockId"><block_id>position-3</block_id></action>
				</block>					
			</reference>

right above it you add this

HTML Code:

<reference name="tops0">
				<block type="cms/block" name="position-19">
					<action method="setBlockId"><block_id>position-19</block_id></action>
				</block>
				<block type="cms/block" name="position-20">
					<action method="setBlockId"><block_id>position-20</block_id></action>
				</block>					
			</reference>

here the position-19 and position-20 are static blocks’s ids that you want to display there
3) Finnally you open the template file of app\design\frontend\default\jm_booktemplate\page\ 2columns-left.phtml to add this

HTML Code:

  <!-- TOP SPOTLIGHT -->
	<?php if ($this->getChildHtml('tops0')) : ?>
	<div id="jm-tops0" class="wrap clearfix">
		<div class="main col2-set">
			<div class="inner clearfix">
				<?php echo $this->getChildHtml('tops0') ?>
			</div>
		</div>
	</div>
	<?php endif; ?>
	<!-- //TOP SPOTLIGHT -->

To right above this block

HTML Code:

  <!-- TOP SPOTLIGHT -->
	<?php if ($this->getChildHtml('tops1')) : ?>
	<div id="jm-tops1" class="wrap clearfix">
		<div class="main col2-set">
			<div class="inner clearfix">
				<?php echo $this->getChildHtml('tops1') ?>
			</div>
		</div>
	</div>
	<?php endif; ?>
	<!-- //TOP SPOTLIGHT -->

I hope this change helps !

#5

Please login or Register to Submit Answer

Written By

Comments