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;








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 ?










share|improve this question






























    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 ?










    share|improve this question


























      3












      3








      3


      1






      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 ?










      share|improve this question
















      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






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      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




















          4 Answers
          4






          active

          oldest

          votes


















          0














          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" />





          share|improve this answer























          • above code didn't work.

            – Shashank Kumrawat
            May 16 '17 at 13:12


















          0














          <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'); ?>






          share|improve this answer























          • 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


















          0














          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>





          share|improve this answer






























            0














            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.






            share|improve this answer























              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
              );



              );













              draft saved

              draft discarded


















              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









              0














              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" />





              share|improve this answer























              • above code didn't work.

                – Shashank Kumrawat
                May 16 '17 at 13:12















              0














              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" />





              share|improve this answer























              • above code didn't work.

                – Shashank Kumrawat
                May 16 '17 at 13:12













              0












              0








              0







              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" />





              share|improve this answer













              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" />






              share|improve this answer












              share|improve this answer



              share|improve this answer










              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

















              • 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













              0














              <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'); ?>






              share|improve this answer























              • 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















              0














              <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'); ?>






              share|improve this answer























              • 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













              0












              0








              0







              <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'); ?>






              share|improve this answer













              <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'); ?>







              share|improve this answer












              share|improve this answer



              share|improve this answer










              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

















              • 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











              0














              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>





              share|improve this answer



























                0














                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>





                share|improve this answer

























                  0












                  0








                  0







                  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>





                  share|improve this answer













                  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>






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered May 17 '17 at 12:39









                  sv3nsv3n

                  10.1k62557




                  10.1k62557





















                      0














                      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.






                      share|improve this answer



























                        0














                        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.






                        share|improve this answer

























                          0












                          0








                          0







                          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.






                          share|improve this answer













                          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.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered May 17 at 18:28









                          Dominic XigenDominic Xigen

                          48610




                          48610



























                              draft saved

                              draft discarded
















































                              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.




                              draft saved


                              draft discarded














                              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





















































                              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







                              Popular posts from this blog

                              Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

                              Circuit construction for execution of conditional statements using least significant bitHow are two different registers being used as “control”?How exactly is the stated composite state of the two registers being produced using the $R_zz$ controlled rotations?Efficiently performing controlled rotations in HHLWould this quantum algorithm implementation work?How to prepare a superposed states of odd integers from $1$ to $sqrtN$?Why is this implementation of the order finding algorithm not working?Circuit construction for Hamiltonian simulationHow can I invert the least significant bit of a certain term of a superposed state?Implementing an oracleImplementing a controlled sum operation

                              Magento 2 “No Payment Methods” in Admin New OrderHow to integrate Paypal Express Checkout with the Magento APIMagento 1.5 - Sales > Order > edit order and shipping methods disappearAuto Invoice Check/Money Order Payment methodAdd more simple payment methods?Shipping methods not showingWhat should I do to change payment methods if changing the configuration has no effects?1.9 - No Payment Methods showing upMy Payment Methods not Showing for downloadable/virtual product when checkout?Magento2 API to access internal payment methodHow to call an existing payment methods in the registration form?