Nested Block ReferenceHow to rewrite a deeply nested block?Layout XML block rendered twice in Magento...

In Linux what happens if 1000 files in a directory are moved to another location while another 300 files were added to the source directory?

Can I write a book of my D&D game?

Can a hotel cancel a confirmed reservation?

Is there any other number that has similar properties as 21?

Strange Sign on Lab Door

How much mayhem could I cause as a sentient fish?

How can animals be objects of ethics without being subjects as well?

Intern applicant asking for compensation equivalent to that of permanent employee

Can I become debt free or should I file bankruptcy ? How to manage my debt and finances?

Why has the mole been redefined for 2019?

How do you funnel food off a cutting board?

CREATE ASSEMBLY System.DirectoryServices.AccountManagement.dll without enabling TRUSTWORTHY

Early credit roll before the end of the film

Cookies - Should the toggles be on?

Do authors have to be politically correct in article-writing?

Who is this Ant Woman character in this image alongside the Wasp?

What is the purpose of easy combat scenarios that don't need resource expenditure?

Explain the objections to these measures against human trafficking

How to escape the null character in here-document?(bash and/or dash)

Is there any differences between "Gucken" and "Schauen"?

We are very unlucky in my court

Which password policy is more secure: one password of length 9 vs. two passwords each of length 8?

How to prevent cleaner from hanging my lock screen in Ubuntu 16.04

Caruana vs Carlsen game 10 (WCC) why not 18...Nxb6?



Nested Block Reference


How to rewrite a deeply nested block?Layout XML block rendered twice in Magento skinLayout reference doesn't workReference a Block not added via LayoutDifference between <action method=“append”> and <block…><block … /></block>How to update reference in block, using value from configuration?Where is Content block for <reference name=“content” tagCreate Block with setTagName nestedMove block to a different reference blockProgramatically get html for block with child blocks













2















While I am studying the Magento Basic Tutorial, there is a question confused me.



I noticed that in the /template/page/html/header.phtml rendered a child block called 'topSearch'.



<?php echo $this->getChildHtml('topSearch') ?>


However, I opened the layout associated file (page.xml), that child block was not defined under the header block. And my understanding from Magento documentation Layout Chapter, that child block would not be rendered.




a Block can only render a child Block if the child Block is included as a nested Block in the Layout XML file.











share|improve this question





























    2















    While I am studying the Magento Basic Tutorial, there is a question confused me.



    I noticed that in the /template/page/html/header.phtml rendered a child block called 'topSearch'.



    <?php echo $this->getChildHtml('topSearch') ?>


    However, I opened the layout associated file (page.xml), that child block was not defined under the header block. And my understanding from Magento documentation Layout Chapter, that child block would not be rendered.




    a Block can only render a child Block if the child Block is included as a nested Block in the Layout XML file.











    share|improve this question



























      2












      2








      2








      While I am studying the Magento Basic Tutorial, there is a question confused me.



      I noticed that in the /template/page/html/header.phtml rendered a child block called 'topSearch'.



      <?php echo $this->getChildHtml('topSearch') ?>


      However, I opened the layout associated file (page.xml), that child block was not defined under the header block. And my understanding from Magento documentation Layout Chapter, that child block would not be rendered.




      a Block can only render a child Block if the child Block is included as a nested Block in the Layout XML file.











      share|improve this question
















      While I am studying the Magento Basic Tutorial, there is a question confused me.



      I noticed that in the /template/page/html/header.phtml rendered a child block called 'topSearch'.



      <?php echo $this->getChildHtml('topSearch') ?>


      However, I opened the layout associated file (page.xml), that child block was not defined under the header block. And my understanding from Magento documentation Layout Chapter, that child block would not be rendered.




      a Block can only render a child Block if the child Block is included as a nested Block in the Layout XML file.








      blocks






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 51 mins ago









      Teja Bhagavan Kollepara

      2,96341847




      2,96341847










      asked Dec 30 '13 at 8:47









      LeongelisLeongelis

      380721




      380721






















          1 Answer
          1






          active

          oldest

          votes


















          2














          app/design/frontend/base/default/layout/catalogsearch.xml defines the search box to be displayed in the header.



           <reference name="header">
          <block type="core/template" name="top.search" as="topSearch" template="catalogsearch/form.mini.phtml"/>
          </reference>


          And this block will be rendered in app/design/frontend/base/default/template/page/html/header.phtml



          <div class="quick-access">
          <?php echo $this->getChildHtml('topSearch') ?>





          share|improve this answer
























          • How would I easily know where else this header block has been referenced?

            – Leongelis
            Dec 30 '13 at 10:00











          • Easiest way is to search in all the xml layout files.

            – Sukeshini
            Dec 30 '13 at 10:05











          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%2f12482%2fnested-block-reference%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2














          app/design/frontend/base/default/layout/catalogsearch.xml defines the search box to be displayed in the header.



           <reference name="header">
          <block type="core/template" name="top.search" as="topSearch" template="catalogsearch/form.mini.phtml"/>
          </reference>


          And this block will be rendered in app/design/frontend/base/default/template/page/html/header.phtml



          <div class="quick-access">
          <?php echo $this->getChildHtml('topSearch') ?>





          share|improve this answer
























          • How would I easily know where else this header block has been referenced?

            – Leongelis
            Dec 30 '13 at 10:00











          • Easiest way is to search in all the xml layout files.

            – Sukeshini
            Dec 30 '13 at 10:05
















          2














          app/design/frontend/base/default/layout/catalogsearch.xml defines the search box to be displayed in the header.



           <reference name="header">
          <block type="core/template" name="top.search" as="topSearch" template="catalogsearch/form.mini.phtml"/>
          </reference>


          And this block will be rendered in app/design/frontend/base/default/template/page/html/header.phtml



          <div class="quick-access">
          <?php echo $this->getChildHtml('topSearch') ?>





          share|improve this answer
























          • How would I easily know where else this header block has been referenced?

            – Leongelis
            Dec 30 '13 at 10:00











          • Easiest way is to search in all the xml layout files.

            – Sukeshini
            Dec 30 '13 at 10:05














          2












          2








          2







          app/design/frontend/base/default/layout/catalogsearch.xml defines the search box to be displayed in the header.



           <reference name="header">
          <block type="core/template" name="top.search" as="topSearch" template="catalogsearch/form.mini.phtml"/>
          </reference>


          And this block will be rendered in app/design/frontend/base/default/template/page/html/header.phtml



          <div class="quick-access">
          <?php echo $this->getChildHtml('topSearch') ?>





          share|improve this answer













          app/design/frontend/base/default/layout/catalogsearch.xml defines the search box to be displayed in the header.



           <reference name="header">
          <block type="core/template" name="top.search" as="topSearch" template="catalogsearch/form.mini.phtml"/>
          </reference>


          And this block will be rendered in app/design/frontend/base/default/template/page/html/header.phtml



          <div class="quick-access">
          <?php echo $this->getChildHtml('topSearch') ?>






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Dec 30 '13 at 9:21









          SukeshiniSukeshini

          6,5041456114




          6,5041456114













          • How would I easily know where else this header block has been referenced?

            – Leongelis
            Dec 30 '13 at 10:00











          • Easiest way is to search in all the xml layout files.

            – Sukeshini
            Dec 30 '13 at 10:05



















          • How would I easily know where else this header block has been referenced?

            – Leongelis
            Dec 30 '13 at 10:00











          • Easiest way is to search in all the xml layout files.

            – Sukeshini
            Dec 30 '13 at 10:05

















          How would I easily know where else this header block has been referenced?

          – Leongelis
          Dec 30 '13 at 10:00





          How would I easily know where else this header block has been referenced?

          – Leongelis
          Dec 30 '13 at 10:00













          Easiest way is to search in all the xml layout files.

          – Sukeshini
          Dec 30 '13 at 10:05





          Easiest way is to search in all the xml layout files.

          – Sukeshini
          Dec 30 '13 at 10:05


















          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%2f12482%2fnested-block-reference%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

          “%fieldName is a required field.”, in Magento2 REST API Call for GET Method Type The Next...

          How to change City field to a dropdown in Checkout step Magento 2Magento 2 : How to change UI field(s)...

          變成蝙蝠會怎樣? 參考資料 外部連結 导航菜单Thomas Nagel, "What is it like to be a...