How to call module block after header?Magento Core: identical block name in one handleMagento new custom block moduleMagento page.xml main content block have no template fileIfconfig then show blockLayout reference doesn't workHow to create a getChildHtml block and call it in anotherMove custom block immediate after navhow to setTemplate in loadLayout - action controllerHow to display my custom block after view.phtml, using XML layout updates only?Magento customer account navigation missing from left column
Function argument returning void or non-void type
Public transport tickets in UK for two weeks
Dealing with spaghetti codebase, manager asks for things I can't deliver
Why would a rational buyer offer to buy with no conditions precedent?
What is the meaning of "<&3" and "done < file11 3< file22"
Natural Armour and Weapons
What are Antecedent & Consequent Phrases in Music?
Is superuser the same as root?
What does kpsewhich stand for?
Is it legal to meet with potential future employers in the UK, whilst visiting from the USA
Is it possible to remotely hack the GPS system and disable GPS service worldwide?
If a (distance) metric on a connected Riemannian manifold locally agrees with the Riemannian metric, is it equal to the induced metric?
Did 20% of US soldiers in Vietnam use heroin, 95% of whom quit afterwards?
Are black holes spherical during merger?
Is it possible to prohibit all prohibitable schools of magic with a single character?
Python program for a simple calculator
Why are Stein manifolds/spaces the analog of affine varieties/schemes in algebraic geometry?
Why did the person in charge of a principality not just declare themself king?
Grade-school elementary algebra presented in an abstract-algebra style?
What is the use case for non-breathable waterproof pants?
What weight should be given to writers groups critiques?
Dad jokes are fun
USPS Back Room - Trespassing?
Need to read my home electrical Meter
How to call module block after header?
Magento Core: identical block name in one handleMagento new custom block moduleMagento page.xml main content block have no template fileIfconfig then show blockLayout reference doesn't workHow to create a getChildHtml block and call it in anotherMove custom block immediate after navhow to setTemplate in loadLayout - action controllerHow to display my custom block after view.phtml, using XML layout updates only?Magento customer account navigation missing from left column
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I have a module layout file like below
<default>
<block name="ampromo_notification" type="ampromo/notification" template="amasty/ampromo/notification.phtml" before="-" />
<reference name="content">
<action ifconfig="ampromo/messages/display_notification" method="append"><block>ampromo_notification</block></action>
</reference>
</default>
This file shows the content of template file at top of content area at frontend.
I want to show this file content just after header block ends.
So how can I move this block to after header?
I have tried this as well in 2columns-left.phtml, but didn't work
<?php echo $this->getChildHtml('ampromo_notification'); ?>
Currently, layout file and template files exist in base>default folder, while I am using theme folder. So can it be a problem ?
layout blocks xml magento1.9.2.3
add a comment |
I have a module layout file like below
<default>
<block name="ampromo_notification" type="ampromo/notification" template="amasty/ampromo/notification.phtml" before="-" />
<reference name="content">
<action ifconfig="ampromo/messages/display_notification" method="append"><block>ampromo_notification</block></action>
</reference>
</default>
This file shows the content of template file at top of content area at frontend.
I want to show this file content just after header block ends.
So how can I move this block to after header?
I have tried this as well in 2columns-left.phtml, but didn't work
<?php echo $this->getChildHtml('ampromo_notification'); ?>
Currently, layout file and template files exist in base>default folder, while I am using theme folder. So can it be a problem ?
layout blocks xml magento1.9.2.3
add a comment |
I have a module layout file like below
<default>
<block name="ampromo_notification" type="ampromo/notification" template="amasty/ampromo/notification.phtml" before="-" />
<reference name="content">
<action ifconfig="ampromo/messages/display_notification" method="append"><block>ampromo_notification</block></action>
</reference>
</default>
This file shows the content of template file at top of content area at frontend.
I want to show this file content just after header block ends.
So how can I move this block to after header?
I have tried this as well in 2columns-left.phtml, but didn't work
<?php echo $this->getChildHtml('ampromo_notification'); ?>
Currently, layout file and template files exist in base>default folder, while I am using theme folder. So can it be a problem ?
layout blocks xml magento1.9.2.3
I have a module layout file like below
<default>
<block name="ampromo_notification" type="ampromo/notification" template="amasty/ampromo/notification.phtml" before="-" />
<reference name="content">
<action ifconfig="ampromo/messages/display_notification" method="append"><block>ampromo_notification</block></action>
</reference>
</default>
This file shows the content of template file at top of content area at frontend.
I want to show this file content just after header block ends.
So how can I move this block to after header?
I have tried this as well in 2columns-left.phtml, but didn't work
<?php echo $this->getChildHtml('ampromo_notification'); ?>
Currently, layout file and template files exist in base>default folder, while I am using theme folder. So can it be a problem ?
layout blocks xml magento1.9.2.3
layout blocks xml magento1.9.2.3
edited Jul 22 '17 at 2:53
Rafael Corrêa Gomes
4,88523366
4,88523366
asked May 16 '17 at 12:21
Shashank KumrawatShashank Kumrawat
1,3331345
1,3331345
add a comment |
add a comment |
4 Answers
4
active
oldest
votes
Replace
<block name="ampromo_notification" type="ampromo/notification" template="amasty/ampromo/notification.phtml" before="-" />
with this
<block name="ampromo_notification" type="ampromo/notification" template="amasty/ampromo/notification.phtml" after="header" />
above code didn't work.
– Shashank Kumrawat
May 16 '17 at 13:12
add a comment |
<reference name="header">
<reference name="top.container">
<block name="ampromo_notification" type="ampromo/notification" template="amasty/ampromo/notification.phtml" after="-" />
</reference>
</reference>
Remove <?php echo $this->getChildHtml('ampromo_notification'); ?>
using above code, it shows content in header block at the top of page, but I want to show it just after the header ends and just before the content starts.
– Shashank Kumrawat
May 16 '17 at 13:12
Are you sure ? did you clean a cache ?
– PЯINCƏ
May 16 '17 at 13:20
Yes.. content is showing at the top of the page now.
– Shashank Kumrawat
May 16 '17 at 13:22
did you removed<?php echo $this->getChildHtml('ampromo_notification'); ?>
in phtml ?
– PЯINCƏ
May 16 '17 at 13:28
yes, ofcourse..I did
– Shashank Kumrawat
May 16 '17 at 14:28
|
show 1 more comment
This is for after header
, inside content
, before all other blocks.
<reference name="content">
<reference name="top.container">
<block name="ampromo_notification" type="ampromo/notification" template="amasty/ampromo/notification.phtml" before="-" />
</reference>
</reference>
Or within global_messages
(before content)
<reference name="global_messages">
<reference name="top.container">
<block name="ampromo_notification" type="ampromo/notification" template="amasty/ampromo/notification.phtml" before="-" />
</reference>
</reference>
add a comment |
As a last resort you can do stuff like this in template html
echo $this->getLayout()
->createBlock('ChapagainHelloWorldBlockHelloWorld')
->setTemplate('Chapagain_HelloWorld::helloworld.phtml')
->toHtml();
And remove the other XML reference. Whilst I appreciate this isn't the best approach we all have deadlines.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f174664%2fhow-to-call-module-block-after-header%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
Replace
<block name="ampromo_notification" type="ampromo/notification" template="amasty/ampromo/notification.phtml" before="-" />
with this
<block name="ampromo_notification" type="ampromo/notification" template="amasty/ampromo/notification.phtml" after="header" />
above code didn't work.
– Shashank Kumrawat
May 16 '17 at 13:12
add a comment |
Replace
<block name="ampromo_notification" type="ampromo/notification" template="amasty/ampromo/notification.phtml" before="-" />
with this
<block name="ampromo_notification" type="ampromo/notification" template="amasty/ampromo/notification.phtml" after="header" />
above code didn't work.
– Shashank Kumrawat
May 16 '17 at 13:12
add a comment |
Replace
<block name="ampromo_notification" type="ampromo/notification" template="amasty/ampromo/notification.phtml" before="-" />
with this
<block name="ampromo_notification" type="ampromo/notification" template="amasty/ampromo/notification.phtml" after="header" />
Replace
<block name="ampromo_notification" type="ampromo/notification" template="amasty/ampromo/notification.phtml" before="-" />
with this
<block name="ampromo_notification" type="ampromo/notification" template="amasty/ampromo/notification.phtml" after="header" />
answered May 16 '17 at 12:31
Dinesh YadavDinesh Yadav
4,1961937
4,1961937
above code didn't work.
– Shashank Kumrawat
May 16 '17 at 13:12
add a comment |
above code didn't work.
– Shashank Kumrawat
May 16 '17 at 13:12
above code didn't work.
– Shashank Kumrawat
May 16 '17 at 13:12
above code didn't work.
– Shashank Kumrawat
May 16 '17 at 13:12
add a comment |
<reference name="header">
<reference name="top.container">
<block name="ampromo_notification" type="ampromo/notification" template="amasty/ampromo/notification.phtml" after="-" />
</reference>
</reference>
Remove <?php echo $this->getChildHtml('ampromo_notification'); ?>
using above code, it shows content in header block at the top of page, but I want to show it just after the header ends and just before the content starts.
– Shashank Kumrawat
May 16 '17 at 13:12
Are you sure ? did you clean a cache ?
– PЯINCƏ
May 16 '17 at 13:20
Yes.. content is showing at the top of the page now.
– Shashank Kumrawat
May 16 '17 at 13:22
did you removed<?php echo $this->getChildHtml('ampromo_notification'); ?>
in phtml ?
– PЯINCƏ
May 16 '17 at 13:28
yes, ofcourse..I did
– Shashank Kumrawat
May 16 '17 at 14:28
|
show 1 more comment
<reference name="header">
<reference name="top.container">
<block name="ampromo_notification" type="ampromo/notification" template="amasty/ampromo/notification.phtml" after="-" />
</reference>
</reference>
Remove <?php echo $this->getChildHtml('ampromo_notification'); ?>
using above code, it shows content in header block at the top of page, but I want to show it just after the header ends and just before the content starts.
– Shashank Kumrawat
May 16 '17 at 13:12
Are you sure ? did you clean a cache ?
– PЯINCƏ
May 16 '17 at 13:20
Yes.. content is showing at the top of the page now.
– Shashank Kumrawat
May 16 '17 at 13:22
did you removed<?php echo $this->getChildHtml('ampromo_notification'); ?>
in phtml ?
– PЯINCƏ
May 16 '17 at 13:28
yes, ofcourse..I did
– Shashank Kumrawat
May 16 '17 at 14:28
|
show 1 more comment
<reference name="header">
<reference name="top.container">
<block name="ampromo_notification" type="ampromo/notification" template="amasty/ampromo/notification.phtml" after="-" />
</reference>
</reference>
Remove <?php echo $this->getChildHtml('ampromo_notification'); ?>
<reference name="header">
<reference name="top.container">
<block name="ampromo_notification" type="ampromo/notification" template="amasty/ampromo/notification.phtml" after="-" />
</reference>
</reference>
Remove <?php echo $this->getChildHtml('ampromo_notification'); ?>
answered May 16 '17 at 12:31
PЯINCƏPЯINCƏ
8,58931147
8,58931147
using above code, it shows content in header block at the top of page, but I want to show it just after the header ends and just before the content starts.
– Shashank Kumrawat
May 16 '17 at 13:12
Are you sure ? did you clean a cache ?
– PЯINCƏ
May 16 '17 at 13:20
Yes.. content is showing at the top of the page now.
– Shashank Kumrawat
May 16 '17 at 13:22
did you removed<?php echo $this->getChildHtml('ampromo_notification'); ?>
in phtml ?
– PЯINCƏ
May 16 '17 at 13:28
yes, ofcourse..I did
– Shashank Kumrawat
May 16 '17 at 14:28
|
show 1 more comment
using above code, it shows content in header block at the top of page, but I want to show it just after the header ends and just before the content starts.
– Shashank Kumrawat
May 16 '17 at 13:12
Are you sure ? did you clean a cache ?
– PЯINCƏ
May 16 '17 at 13:20
Yes.. content is showing at the top of the page now.
– Shashank Kumrawat
May 16 '17 at 13:22
did you removed<?php echo $this->getChildHtml('ampromo_notification'); ?>
in phtml ?
– PЯINCƏ
May 16 '17 at 13:28
yes, ofcourse..I did
– Shashank Kumrawat
May 16 '17 at 14:28
using above code, it shows content in header block at the top of page, but I want to show it just after the header ends and just before the content starts.
– Shashank Kumrawat
May 16 '17 at 13:12
using above code, it shows content in header block at the top of page, but I want to show it just after the header ends and just before the content starts.
– Shashank Kumrawat
May 16 '17 at 13:12
Are you sure ? did you clean a cache ?
– PЯINCƏ
May 16 '17 at 13:20
Are you sure ? did you clean a cache ?
– PЯINCƏ
May 16 '17 at 13:20
Yes.. content is showing at the top of the page now.
– Shashank Kumrawat
May 16 '17 at 13:22
Yes.. content is showing at the top of the page now.
– Shashank Kumrawat
May 16 '17 at 13:22
did you removed
<?php echo $this->getChildHtml('ampromo_notification'); ?>
in phtml ?– PЯINCƏ
May 16 '17 at 13:28
did you removed
<?php echo $this->getChildHtml('ampromo_notification'); ?>
in phtml ?– PЯINCƏ
May 16 '17 at 13:28
yes, ofcourse..I did
– Shashank Kumrawat
May 16 '17 at 14:28
yes, ofcourse..I did
– Shashank Kumrawat
May 16 '17 at 14:28
|
show 1 more comment
This is for after header
, inside content
, before all other blocks.
<reference name="content">
<reference name="top.container">
<block name="ampromo_notification" type="ampromo/notification" template="amasty/ampromo/notification.phtml" before="-" />
</reference>
</reference>
Or within global_messages
(before content)
<reference name="global_messages">
<reference name="top.container">
<block name="ampromo_notification" type="ampromo/notification" template="amasty/ampromo/notification.phtml" before="-" />
</reference>
</reference>
add a comment |
This is for after header
, inside content
, before all other blocks.
<reference name="content">
<reference name="top.container">
<block name="ampromo_notification" type="ampromo/notification" template="amasty/ampromo/notification.phtml" before="-" />
</reference>
</reference>
Or within global_messages
(before content)
<reference name="global_messages">
<reference name="top.container">
<block name="ampromo_notification" type="ampromo/notification" template="amasty/ampromo/notification.phtml" before="-" />
</reference>
</reference>
add a comment |
This is for after header
, inside content
, before all other blocks.
<reference name="content">
<reference name="top.container">
<block name="ampromo_notification" type="ampromo/notification" template="amasty/ampromo/notification.phtml" before="-" />
</reference>
</reference>
Or within global_messages
(before content)
<reference name="global_messages">
<reference name="top.container">
<block name="ampromo_notification" type="ampromo/notification" template="amasty/ampromo/notification.phtml" before="-" />
</reference>
</reference>
This is for after header
, inside content
, before all other blocks.
<reference name="content">
<reference name="top.container">
<block name="ampromo_notification" type="ampromo/notification" template="amasty/ampromo/notification.phtml" before="-" />
</reference>
</reference>
Or within global_messages
(before content)
<reference name="global_messages">
<reference name="top.container">
<block name="ampromo_notification" type="ampromo/notification" template="amasty/ampromo/notification.phtml" before="-" />
</reference>
</reference>
answered May 17 '17 at 12:39
sv3nsv3n
10.1k62557
10.1k62557
add a comment |
add a comment |
As a last resort you can do stuff like this in template html
echo $this->getLayout()
->createBlock('ChapagainHelloWorldBlockHelloWorld')
->setTemplate('Chapagain_HelloWorld::helloworld.phtml')
->toHtml();
And remove the other XML reference. Whilst I appreciate this isn't the best approach we all have deadlines.
add a comment |
As a last resort you can do stuff like this in template html
echo $this->getLayout()
->createBlock('ChapagainHelloWorldBlockHelloWorld')
->setTemplate('Chapagain_HelloWorld::helloworld.phtml')
->toHtml();
And remove the other XML reference. Whilst I appreciate this isn't the best approach we all have deadlines.
add a comment |
As a last resort you can do stuff like this in template html
echo $this->getLayout()
->createBlock('ChapagainHelloWorldBlockHelloWorld')
->setTemplate('Chapagain_HelloWorld::helloworld.phtml')
->toHtml();
And remove the other XML reference. Whilst I appreciate this isn't the best approach we all have deadlines.
As a last resort you can do stuff like this in template html
echo $this->getLayout()
->createBlock('ChapagainHelloWorldBlockHelloWorld')
->setTemplate('Chapagain_HelloWorld::helloworld.phtml')
->toHtml();
And remove the other XML reference. Whilst I appreciate this isn't the best approach we all have deadlines.
answered May 17 at 18:28
Dominic XigenDominic Xigen
48610
48610
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f174664%2fhow-to-call-module-block-after-header%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown