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

                              Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

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

                              Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form