Presently on my site all messages showing on middle of the page but want to display all messages on top of the page. any idea? please share.
'
<?php
global $var_yttheme;
?>
<!DOCTYPE html>
<html xml:lang="<?php echo $this->getLang() ?>" lang="<?php echo $this->getLang() ?>">
<head>
<meta name="format-detection" content="telephone=no">
<?php echo $this->getChildHtml('head') ?>
</head>
<?php
if( $var_yttheme->getParam('usebgimage') == 1 && $var_yttheme->getParam('usecustomizeimage') == 0 ){
$bg_image = $var_yttheme->getParam('bgimage');
}else{
$bg_image = '';
}
$hdStyles = $var_yttheme->getParam('headerstyles');
$classHeader = "";
$classHome = "";
if($hdStyles == 'header1'){
$classHeader = "header1-wrap";
} elseif($hdStyles == 'header2') {
$classHeader = "header2-wrap";
} elseif($hdStyles == 'header3') {
$classHeader = "header3-wrap";
} elseif($hdStyles == 'header4') {
$classHeader = "header4-wrap";
}
if( Mage::getSingleton('cms/page')->getIdentifier() == 'home-v4' &&
Mage::app()->getFrontController()->getRequest()->getRouteName() == 'cms' ) {
$classHome = "homepagev4";
}
?>
<body id="bd" class="<?php echo $var_yttheme->template ?> <?php echo $bg_image;?> <?php if( $var_yttheme->getParam('layoutstyle') == '2' ){echo "layout-boxed";}?> <?php echo $this->getBodyClass();?> <?php echo $classHome;?>">
<?php echo $this->getChildHtml('after_body_start') ?>
<div id="yt_wrapper">
<!-- BEGIN: Header -->
<div id="yt_header" class="yt-header wrap <?php echo $classHeader; ?>">
<?php echo $this->getChildHtml('header') ?>
</div>
<!-- END: Header -->
<!-- BEGIN: content -->
<div id="yt_content" class="yt-content wrap">
<div id="yt_main" class="yt-main col-main">
<div class="yt-main-inner yt-content-inner">
<div class="container">
<div class ="row">
<?php if($this->getChildHtml('breadcrumbs')){ ?>
<?php echo $this->getChildHtml('breadcrumbs') ?>
<?php } ?>
<div class="columns-w">
<?php echo $this->getChildHtml('global_notices') ?>
<?php echo $this->getChildHtml('global_messages') ?>
<?php if( $this->getChildHtml('banner-top-home') ){?>
<?php echo $this->getChildHtml('banner-top-home');?>
<?php }?>
<?php echo $this->getChildHtml('content'); ?>
</div>
</div>
</div>
<!-- Hot categories home page -->
<?php if( $this->getChildHtml('hot-categories') ){?>
<div class="hotcate-wrap">
<div class="container">
<div class ="row">
<?php echo $this->getChildHtml('hot-categories');?>
</div>
</div>
</div>
<?php }?>
</div>
</div>
</div>
<!-- END: content -->
<!-- BEGIN: footer -->
<div id="yt_footer" class="yt-footer wrap">
<?php echo $this->getChildHtml('footer') ?>
</div>
<!-- END: footer -->
<?php
if( Mage::getSingleton('cms/page')->getIdentifier() == 'home' &&
Mage::app()->getFrontController()->getRequest()->getRouteName() == 'cms' && $var_yttheme->getParam('showPopup') == 1 ) {
?>
<?php echo $this->getChildHtml('popup_location') ?>
<?php } ?>
<?php echo $this->getChildHtml('before_body_end') ?>
<?php echo $this->getAbsoluteFooter() ?>
</div>
</body>
</html>
'
this is my 1column.phtml file please edit your answer in this file.
"updated file is,"
app\design\frontend\mypackage\mytheme\template\page\1column.phtml
'
<?php
global $var_yttheme;
?>
<!DOCTYPE html>
<html xml:lang="<?php echo $this->getLang() ?>" lang="<?php echo $this->getLang() ?>">
<head>
<meta name="format-detection" content="telephone=no">
<?php echo $this->getChildHtml('head') ?>
</head>
<?php
if( $var_yttheme->getParam('usebgimage') == 1 && $var_yttheme->getParam('usecustomizeimage') == 0 ){
$bg_image = $var_yttheme->getParam('bgimage');
}else{
$bg_image = '';
}
$hdStyles = $var_yttheme->getParam('headerstyles');
$classHeader = "";
$classHome = "";
if($hdStyles == 'header1'){
$classHeader = "header1-wrap";
} elseif($hdStyles == 'header2') {
$classHeader = "header2-wrap";
} elseif($hdStyles == 'header3') {
$classHeader = "header3-wrap";
} elseif($hdStyles == 'header4') {
$classHeader = "header4-wrap";
}
if( Mage::getSingleton('cms/page')->getIdentifier() == 'home-v4' &&
Mage::app()->getFrontController()->getRequest()->getRouteName() == 'cms' ) {
$classHome = "homepagev4";
}
?>
<body id="bd" class="<?php echo $var_yttheme->template ?> <?php echo $bg_image;?> <?php if( $var_yttheme->getParam('layoutstyle') == '2' ){echo "layout-boxed";}?> <?php echo $this->getBodyClass();?> <?php echo $classHome;?>">
<?php echo $this->getChildHtml('after_body_start') ?>
<div id="yt_wrapper">
<?php echo $this->getChildHtml('global_messages') ?>
<!-- BEGIN: Header -->
<div id="yt_header" class="yt-header wrap <?php echo $classHeader; ?>">
<?php echo $this->getChildHtml('header') ?>
</div>
<!-- END: Header -->
<!-- BEGIN: content -->
<div id="yt_content" class="yt-content wrap">
<div id="yt_main" class="yt-main col-main">
<div class="yt-main-inner yt-content-inner">
<div class="container">
<div class ="row">
<?php if($this->getChildHtml('breadcrumbs')){ ?>
<?php echo $this->getChildHtml('breadcrumbs') ?>
<?php } ?>
<div class="columns-w">
<?php echo $this->getChildHtml('global_notices') ?>
<?php if( $this->getChildHtml('banner-top-home') ){?>
<?php echo $this->getChildHtml('banner-top-home');?>
<?php }?>
<?php echo $this->getChildHtml('content'); ?>
</div>
</div>
</div>
<!-- Hot categories home page -->
<?php if( $this->getChildHtml('hot-categories') ){?>
<div class="hotcate-wrap">
<div class="container">
<div class ="row">
<?php echo $this->getChildHtml('hot-categories');?>
</div>
</div>
</div>
<?php }?>
</div>
</div>
</div>
<!-- END: content -->
<!-- BEGIN: footer -->
<div id="yt_footer" class="yt-footer wrap">
<?php echo $this->getChildHtml('footer') ?>
</div>
<!-- END: footer -->
<?php
if( Mage::getSingleton('cms/page')->getIdentifier() == 'home' &&
Mage::app()->getFrontController()->getRequest()->getRouteName() == 'cms' && $var_yttheme->getParam('showPopup') == 1 ) {
?>
<?php echo $this->getChildHtml('popup_location') ?>
<?php } ?>
<?php echo $this->getChildHtml('before_body_end') ?>
<?php echo $this->getAbsoluteFooter() ?>
</div>
</body>
</html>'
app\design\frontend\mypackage\mytheme\template\page\2columns-left.phtml
'
<?php
global $var_yttheme;
?>
<!DOCTYPE html>
<html xml:lang="<?php echo $this->getLang() ?>" lang="<?php echo $this->getLang() ?>">
<head>
<meta name="format-detection" content="telephone=no">
<?php echo $this->getChildHtml('head') ?>
</head>
<?php
if( $var_yttheme->getParam('usebgimage') == 1 && $var_yttheme->getParam('usecustomizeimage') == 0 ){
$bg_image = $var_yttheme->getParam('bgimage');
}else{
$bg_image = '';
}
$hdStyles = $var_yttheme->getParam('headerstyles');
$classHeader = "";
$classHome = "";
if($hdStyles == 'header1'){
$classHeader = "header1-wrap";
} elseif($hdStyles == 'header2') {
$classHeader = "header2-wrap";
} elseif($hdStyles == 'header3') {
$classHeader = "header3-wrap";
} elseif($hdStyles == 'header4') {
$classHeader = "header4-wrap";
}
if( Mage::getSingleton('cms/page')->getIdentifier() == 'home-v3' &&
Mage::app()->getFrontController()->getRequest()->getRouteName() == 'cms' ) {
$classHome = "homepagev3";
}
?>
<body id="bd" class="<?php echo $var_yttheme->template ?> <?php echo $bg_image;?> <?php if( $var_yttheme->getParam('layoutstyle') == '2' ){echo "layout-boxed";}?> <?php echo $this->getBodyClass();?> <?php echo $classHome;?>">
<?php echo $this->getChildHtml('after_body_start') ?>
<div id="yt_wrapper">
<?php echo $this->getChildHtml('global_messages') ?>
<!-- BEGIN: Header -->
<div id="yt_header" class="yt-header wrap <?php echo $classHeader; ?>">
<?php echo $this->getChildHtml('header') ?>
</div>
<!-- END: Header -->
<!-- BEGIN: content -->
<div id="yt_content" class="yt-content wrap">
<div class="yt-content-inner">
<div class="container">
<div class ="row">
<?php if($this->getChildHtml('breadcrumbs')){ ?>
<?php echo $this->getChildHtml('breadcrumbs') ?>
<?php } ?>
<div class="columns-w">
<div id="yt_left" class="col-lg-3 col-md-3 col-sm-4 col-xs-12">
<div class="yt-left-wrap">
<?php if( Mage::getSingleton('cms/page')->getIdentifier() == 'home-v3' &&
Mage::app()->getFrontController()->getRequest()->getRouteName() == 'cms' ) { ?>
<div id="yt-responsivemenu" class="yt-responsivemenu">
<?php echo $this->getChildHtml('mobiMenu2'); ?>
</div>
<div class="yt-menu">
<div id="btn_categories">
<span><i class="icon-cate"></i><?php echo $this->__("Categories"); ?></span>
</div>
<div class="yt-menu-content">
<?php if( $var_yttheme->getParam('menustyle') == 'mega' ){
echo $this->getChildHtml('megamenu-vertical-home');
} else {
echo $this->getChildHtml('topMenu2');
} ?>
</div>
</div>
<script type="text/javascript">
jQuery(document).ready(function($){
//menu more cate
$i = 0;
$('.sm_megamenu_wrapper_vertical_menu .sm_megamenu_menu').append('<div class="more-wrap"><span class="more-view"><?php echo $this->__("More Categories"); ?></span></div>');
$('.sm_megamenu_wrapper_vertical_menu .sm_megamenu_menu > li.sm_megamenu_lv1').each(function(){
$i ++;
if($i>11){
$(this).css('display', 'none');
}
});
$('.sm_megamenu_wrapper_vertical_menu .sm_megamenu_menu .more-wrap > .more-view').click(function(){
if($(this).hasClass('open')){
$i=0;
$('.sm_megamenu_wrapper_vertical_menu .sm_megamenu_menu > li.sm_megamenu_lv1').each(function(){
$i ++;
if($i>11){
$(this).slideUp(200);
//$(this).addClass('disappear');
//$(this).removeClass('appear');
}
});
$(this).removeClass('open');
$('.more-wrap').removeClass('active-i');
$(this).text('More Categories');
}else{
$i=0;
$('.sm_megamenu_wrapper_vertical_menu .sm_megamenu_menu > li.sm_megamenu_lv1').each(function(){
$i ++;
if($i>11){
$(this).slideDown(200);
// $(this).addClass('appear');
//$(this).removeClass('disappear');
}
});
$(this).addClass('open');
$('.more-wrap').addClass('active-i');
$(this).text('Close Menu');
}
});
})
</script>
<?php } ?>
<?php echo $this->getChildHtml('left') ?>
</div>
</div>
<div id="yt_main" class="yt-main-right yt-main col-main col-lg-9 col-md-9 col-sm-8 col-xs-12">
<div class="yt_main_inner">
<?php echo $this->getChildHtml('global_notices') ?>
<?php echo $this->getTitle() ?>
<?php echo $this->getChildHtml('content') ?>
</div>
</div>
</div>
</div>
</div>
<!-- Hot categories home page v3 -->
<?php if( $this->getChildHtml('hot-categories') ){?>
<div class="hotcate-wrap">
<div class="container">
<div class ="row">
<?php echo $this->getChildHtml('hot-categories');?>
</div>
</div>
</div>
<?php }?>
</div>
</div>
<!-- END: content -->
<!-- BEGIN: footer -->
<div id="yt_footer" class="yt-footer wrap">
<?php echo $this->getChildHtml('footer') ?>
</div>
<!-- END: footer -->
<?php echo $this->getChildHtml('before_body_end') ?>
<?php echo $this->getAbsoluteFooter() ?>
</div>
</body>
</html>'
app\design\frontend\mypackage\mytheme\template\page\2columns-right.phtml
'<?php
global $var_yttheme;
?>
<!DOCTYPE html>
<html xml:lang="<?php echo $this->getLang() ?>" lang="<?php echo $this->getLang() ?>">
<head>
<meta name="format-detection" content="telephone=no">
<?php echo $this->getChildHtml('head') ?>
</head>
<?php
if( $var_yttheme->getParam('usebgimage') == 1 && $var_yttheme->getParam('usecustomizeimage') == 0 ){
$bg_image = $var_yttheme->getParam('bgimage');
}else{
$bg_image = '';
}
$hdStyles = $var_yttheme->getParam('headerstyles');
$classHeader = "";
$classHome = "";
if($hdStyles == 'header1'){
$classHeader = "header1-wrap";
} elseif($hdStyles == 'header2') {
$classHeader = "header2-wrap";
} elseif($hdStyles == 'header3') {
$classHeader = "header3-wrap";
} elseif($hdStyles == 'header4') {
$classHeader = "header4-wrap";
}
if( Mage::getSingleton('cms/page')->getIdentifier() == 'home-v2' &&
Mage::app()->getFrontController()->getRequest()->getRouteName() == 'cms' ) {
$classHome = "homepagev2";
}
?>
<body id="bd" class="<?php echo $var_yttheme->template ?> <?php echo $bg_image;?> <?php if( $var_yttheme->getParam('layoutstyle') == '2' ){echo "layout-boxed";}?> <?php echo $this->getBodyClass();?> <?php echo $classHome;?>">
<?php echo $this->getChildHtml('after_body_start') ?>
<div id="yt_wrapper">
<?php echo $this->getChildHtml('global_messages') ?>
<!-- BEGIN: Header -->
<div id="yt_header" class="yt-header wrap <?php echo $classHeader; ?>">
<?php echo $this->getChildHtml('header') ?>
</div>
<!-- END: Header -->
<!-- BEGIN: content -->
<div id="yt_content" class="yt-content wrap">
<div class="yt-content-inner">
<div class="container">
<div class ="row">
<?php if($this->getChildHtml('breadcrumbs')){ ?>
<?php echo $this->getChildHtml('breadcrumbs') ?>
<?php } ?>
<div class="columns-w">
<div id="yt_main" class="yt-main-left yt-main col-main col-lg-9 col-md-9 col-sm-8 col-xs-12">
<div class="yt_main_inner">
<?php echo $this->getChildHtml('global_notices') ?>
<?php echo $this->getTitle() ?>
<?php echo $this->getChildHtml('content') ?>
</div>
</div>
<div id="yt_right" class="col-lg-3 col-md-3 col-sm-4 col-xs-12">
<div class="yt-right-wrap">
<?php echo $this->getChildHtml('right') ?>
</div>
</div>
</div>
</div>
</div>
<!-- Hot categories home page v2 -->
<?php if( $this->getChildHtml('hot-categories') ){?>
<div class="hotcate-wrap">
<div class="container">
<div class ="row">
<?php echo $this->getChildHtml('hot-categories');?>
</div>
</div>
</div>
<?php }?>
</div>
</div>
<!-- END: content -->
<!-- BEGIN: footer -->
<div id="yt_footer" class="yt-footer wrap">
<?php echo $this->getChildHtml('footer') ?>
</div>
<!-- END: footer -->
<?php echo $this->getChildHtml('before_body_end') ?>
<?php echo $this->getAbsoluteFooter() ?>
</div>
</body>
</html>'
app\design\frontend\mypackage\mytheme\template\page\3columns.phtml
'<?php
global $var_yttheme;
?>
<!DOCTYPE html>
<html xml:lang="<?php echo $this->getLang() ?>" lang="<?php echo $this->getLang() ?>">
<head>
<meta name="format-detection" content="telephone=no">
<?php echo $this->getChildHtml('head') ?>
</head>
<?php
if( $var_yttheme->getParam('usebgimage') == 1 && $var_yttheme->getParam('usecustomizeimage') == 0 ){
$bg_image = $var_yttheme->getParam('bgimage');
}else{
$bg_image = '';
}
?>
<body id="bd" class="<?php echo $var_yttheme->template ?> <?php echo $bg_image;?> <?php if( $var_yttheme->getParam('layoutstyle') == '2' ){echo "layout-boxed";}?> <?php echo $this->getBodyClass();?>">
<?php echo $this->getChildHtml('after_body_start') ?>
<div id="yt_wrapper">
<?php echo $this->getChildHtml('global_messages') ?>
<!-- BEGIN: Header -->
<div id="yt_header" class="yt-header wrap">
<?php echo $this->getChildHtml('header') ?>
</div>
<!-- END: Header -->
<!-- BEGIN: content -->
<div id="yt_content" class="yt-content wrap">
<div class="yt-breadcrumbs">
<div class="container">
<div class="row">
<?php echo $this->getChildHtml('breadcrumbs') ?>
</div>
</div>
</div>
<div class="yt-content-inner">
<div class="container">
<div class ="row">
<div id="yt_left" class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
<div class="yt-left-wrap">
<?php echo $this->getChildHtml('left') ?>
</div>
</div>
<div id="yt_main" class="yt-main-right yt-main col-main col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="yt_main_inner">
<?php echo $this->getChildHtml('global_notices') ?>
<?php echo $this->getTitle() ?>
<?php echo $this->getChildHtml('content') ?>
</div>
</div>
<div id="yt_right" class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
<div class="yt-right-wrap">
<?php echo $this->getChildHtml('right') ?>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- END: content -->
<!-- BEGIN: footer -->
<div id="yt_footer" class="yt-footer wrap">
<?php echo $this->getChildHtml('footer') ?>
</div>
<!-- END: footer -->
<?php echo $this->getChildHtml('before_body_end') ?>
<?php echo $this->getAbsoluteFooter() ?>
</div>
</body>
</html>'
Best Answer
These are called the global messages. They were add as a child in all template layout files. So for changing the position of these global notices go to
app/design/frontend/youpakacage/youtheme/template/page/1column.phtml
and change these position of global messages block. mean move this code
<?php echo $this->getChildHtml('global_messages') ?>
same as go for other three template files.
page/2columns-left.phtml
,page/2columns-right.phtml
,page/3columns.phtml
.updated file