Block not appearing when giving custom type The Next CEO of Stack OverflowInserting Open Graph tags via custom module and blockmagento home page block not workingMagento module Invalid block typeCustom Block “Invalid Block Type”, even-though everything looks correctContent block not showingMagento Block disappears after override in custom moduleHow to check if concrete type of cache is enabled in M1?Custom module throwing 'invalid block type' after being pushed to the staging environmentConditionally load js based on cms static block typeRemove block not working in custom xml layout?

Inappropriate reference requests from Journal reviewers

Won the lottery - how do I keep the money?

Would a galaxy be visible from outside, but nearby?

What does "Its cash flow is deeply negative" mean?

How to start emacs in "nothing" mode (`fundamental-mode`)

How to invert MapIndexed on a ragged structure? How to construct a tree from rules?

Elegant way to replace substring in a regex with optional groups in Python?

Between two walls

Why am I allowed to create multiple unique pointers from a single object?

Why has the US not been more assertive in confronting Russia in recent years?

Rotate a column

Example of a Mathematician/Physicist whose Other Publications during their PhD eclipsed their PhD Thesis

How to add tiny 0.5A 120V load to very remote split phase 240v 3 wire well house

Is it my responsibility to learn a new technology in my own time my employer wants to implement?

Preparing Indesign booklet with .psd graphics for print

Is there a difference between "Fahrstuhl" and "Aufzug"

Why does standard notation not preserve intervals (visually)

What flight has the highest ratio of time difference to flight time?

Parametric curve length - calculus

What is the result of assigning to std::vector<T>::begin()?

What's the best way to handle refactoring a big file?

How to avoid supervisors with prejudiced views?

What happened in Rome, when the western empire "fell"?

Why do we use the plural of movies in this phrase "We went to the movies last night."?



Block not appearing when giving custom type



The Next CEO of Stack OverflowInserting Open Graph tags via custom module and blockmagento home page block not workingMagento module Invalid block typeCustom Block “Invalid Block Type”, even-though everything looks correctContent block not showingMagento Block disappears after override in custom moduleHow to check if concrete type of cache is enabled in M1?Custom module throwing 'invalid block type' after being pushed to the staging environmentConditionally load js based on cms static block typeRemove block not working in custom xml layout?










1















I am trying to nest one block inside another block but the child block isn't showing when I set custom block type.



If I set both blocks as page/html then both blocks show fine:



<?xml version="1.0"?>
<layout version="0.1.0">
<mobilemenu_index_index>
<block type="page/html" name="root" output="toHtml" template="company_mobilemenu/test_page.phtml">
<block type="page/html" name="company_mobilemmenu" template="company_mobilemenu/menu.phtml" />
</block>
</mobilemenu_index_index>
</layout>


But when I declare my custom block type so that I can use the custom block methods the block doesn't show.



<?xml version="1.0"?>
<layout version="0.1.0">
<mobilemenu_index_index>
<block type="page/html" name="root" output="toHtml" template="company_mobilemenu/test_page.phtml">
<block type="mobilemenu/mobilemenublock" name="company_mobilemmenu" template="company_mobilemenu/menu.phtml" />
</block>
</mobilemenu_index_index>
</layout>


I have made this file: app/code/local/Company/MobileMenu/Block/MobileMenuBlock.php that has this contents:



<?php
class Company_MobileMenu_Block_MobileMenuBlock extends Mage_Core_Block_Template

public function getNestedMenu()

return 'nested menu goes here';




In my config.xml I register it like so:



<config>
<modules>
<Company_MobileMenu>
<version>0.1.0</version>
</Company_MobileMenu>
</modules>
<global>
<blocks>
<mobilemenu>
<class>Company_MobileMenu_Block</class>
</mobilemenu>
</blocks>
</global>
<frontend>
<routers>
<mobilemenu>
<use>standard</use>
<args>
<module>Company_MobileMenu</module>
<frontName>mobilemenu</frontName>
</args>
</mobilemenu>
</routers>
<layout>
<updates>
<mobilemenu>
<file>company_mobilemenu.xml</file>
</mobilemenu>
</updates>
</layout>
</frontend>
</config>


What am I doing wrong with custom block registration?










share|improve this question


























    1















    I am trying to nest one block inside another block but the child block isn't showing when I set custom block type.



    If I set both blocks as page/html then both blocks show fine:



    <?xml version="1.0"?>
    <layout version="0.1.0">
    <mobilemenu_index_index>
    <block type="page/html" name="root" output="toHtml" template="company_mobilemenu/test_page.phtml">
    <block type="page/html" name="company_mobilemmenu" template="company_mobilemenu/menu.phtml" />
    </block>
    </mobilemenu_index_index>
    </layout>


    But when I declare my custom block type so that I can use the custom block methods the block doesn't show.



    <?xml version="1.0"?>
    <layout version="0.1.0">
    <mobilemenu_index_index>
    <block type="page/html" name="root" output="toHtml" template="company_mobilemenu/test_page.phtml">
    <block type="mobilemenu/mobilemenublock" name="company_mobilemmenu" template="company_mobilemenu/menu.phtml" />
    </block>
    </mobilemenu_index_index>
    </layout>


    I have made this file: app/code/local/Company/MobileMenu/Block/MobileMenuBlock.php that has this contents:



    <?php
    class Company_MobileMenu_Block_MobileMenuBlock extends Mage_Core_Block_Template

    public function getNestedMenu()

    return 'nested menu goes here';




    In my config.xml I register it like so:



    <config>
    <modules>
    <Company_MobileMenu>
    <version>0.1.0</version>
    </Company_MobileMenu>
    </modules>
    <global>
    <blocks>
    <mobilemenu>
    <class>Company_MobileMenu_Block</class>
    </mobilemenu>
    </blocks>
    </global>
    <frontend>
    <routers>
    <mobilemenu>
    <use>standard</use>
    <args>
    <module>Company_MobileMenu</module>
    <frontName>mobilemenu</frontName>
    </args>
    </mobilemenu>
    </routers>
    <layout>
    <updates>
    <mobilemenu>
    <file>company_mobilemenu.xml</file>
    </mobilemenu>
    </updates>
    </layout>
    </frontend>
    </config>


    What am I doing wrong with custom block registration?










    share|improve this question
























      1












      1








      1








      I am trying to nest one block inside another block but the child block isn't showing when I set custom block type.



      If I set both blocks as page/html then both blocks show fine:



      <?xml version="1.0"?>
      <layout version="0.1.0">
      <mobilemenu_index_index>
      <block type="page/html" name="root" output="toHtml" template="company_mobilemenu/test_page.phtml">
      <block type="page/html" name="company_mobilemmenu" template="company_mobilemenu/menu.phtml" />
      </block>
      </mobilemenu_index_index>
      </layout>


      But when I declare my custom block type so that I can use the custom block methods the block doesn't show.



      <?xml version="1.0"?>
      <layout version="0.1.0">
      <mobilemenu_index_index>
      <block type="page/html" name="root" output="toHtml" template="company_mobilemenu/test_page.phtml">
      <block type="mobilemenu/mobilemenublock" name="company_mobilemmenu" template="company_mobilemenu/menu.phtml" />
      </block>
      </mobilemenu_index_index>
      </layout>


      I have made this file: app/code/local/Company/MobileMenu/Block/MobileMenuBlock.php that has this contents:



      <?php
      class Company_MobileMenu_Block_MobileMenuBlock extends Mage_Core_Block_Template

      public function getNestedMenu()

      return 'nested menu goes here';




      In my config.xml I register it like so:



      <config>
      <modules>
      <Company_MobileMenu>
      <version>0.1.0</version>
      </Company_MobileMenu>
      </modules>
      <global>
      <blocks>
      <mobilemenu>
      <class>Company_MobileMenu_Block</class>
      </mobilemenu>
      </blocks>
      </global>
      <frontend>
      <routers>
      <mobilemenu>
      <use>standard</use>
      <args>
      <module>Company_MobileMenu</module>
      <frontName>mobilemenu</frontName>
      </args>
      </mobilemenu>
      </routers>
      <layout>
      <updates>
      <mobilemenu>
      <file>company_mobilemenu.xml</file>
      </mobilemenu>
      </updates>
      </layout>
      </frontend>
      </config>


      What am I doing wrong with custom block registration?










      share|improve this question














      I am trying to nest one block inside another block but the child block isn't showing when I set custom block type.



      If I set both blocks as page/html then both blocks show fine:



      <?xml version="1.0"?>
      <layout version="0.1.0">
      <mobilemenu_index_index>
      <block type="page/html" name="root" output="toHtml" template="company_mobilemenu/test_page.phtml">
      <block type="page/html" name="company_mobilemmenu" template="company_mobilemenu/menu.phtml" />
      </block>
      </mobilemenu_index_index>
      </layout>


      But when I declare my custom block type so that I can use the custom block methods the block doesn't show.



      <?xml version="1.0"?>
      <layout version="0.1.0">
      <mobilemenu_index_index>
      <block type="page/html" name="root" output="toHtml" template="company_mobilemenu/test_page.phtml">
      <block type="mobilemenu/mobilemenublock" name="company_mobilemmenu" template="company_mobilemenu/menu.phtml" />
      </block>
      </mobilemenu_index_index>
      </layout>


      I have made this file: app/code/local/Company/MobileMenu/Block/MobileMenuBlock.php that has this contents:



      <?php
      class Company_MobileMenu_Block_MobileMenuBlock extends Mage_Core_Block_Template

      public function getNestedMenu()

      return 'nested menu goes here';




      In my config.xml I register it like so:



      <config>
      <modules>
      <Company_MobileMenu>
      <version>0.1.0</version>
      </Company_MobileMenu>
      </modules>
      <global>
      <blocks>
      <mobilemenu>
      <class>Company_MobileMenu_Block</class>
      </mobilemenu>
      </blocks>
      </global>
      <frontend>
      <routers>
      <mobilemenu>
      <use>standard</use>
      <args>
      <module>Company_MobileMenu</module>
      <frontName>mobilemenu</frontName>
      </args>
      </mobilemenu>
      </routers>
      <layout>
      <updates>
      <mobilemenu>
      <file>company_mobilemenu.xml</file>
      </mobilemenu>
      </updates>
      </layout>
      </frontend>
      </config>


      What am I doing wrong with custom block registration?







      magento-1.9 blocks custom-block






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 2 days ago









      GuerrillaGuerrilla

      12211




      12211




















          1 Answer
          1






          active

          oldest

          votes


















          2














          change type="mobilemenu/mobilemenublock" to type="mobilemenu/mobileMenuBlock"






          share|improve this answer























          • You just saved my sanity. Been checking everything a million times and didn't know about that case convention. Thank you

            – Guerrilla
            2 days ago











          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%2f267711%2fblock-not-appearing-when-giving-custom-type%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














          change type="mobilemenu/mobilemenublock" to type="mobilemenu/mobileMenuBlock"






          share|improve this answer























          • You just saved my sanity. Been checking everything a million times and didn't know about that case convention. Thank you

            – Guerrilla
            2 days ago















          2














          change type="mobilemenu/mobilemenublock" to type="mobilemenu/mobileMenuBlock"






          share|improve this answer























          • You just saved my sanity. Been checking everything a million times and didn't know about that case convention. Thank you

            – Guerrilla
            2 days ago













          2












          2








          2







          change type="mobilemenu/mobilemenublock" to type="mobilemenu/mobileMenuBlock"






          share|improve this answer













          change type="mobilemenu/mobilemenublock" to type="mobilemenu/mobileMenuBlock"







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 2 days ago









          MariusMarius

          167k28319686




          167k28319686












          • You just saved my sanity. Been checking everything a million times and didn't know about that case convention. Thank you

            – Guerrilla
            2 days ago

















          • You just saved my sanity. Been checking everything a million times and didn't know about that case convention. Thank you

            – Guerrilla
            2 days ago
















          You just saved my sanity. Been checking everything a million times and didn't know about that case convention. Thank you

          – Guerrilla
          2 days ago





          You just saved my sanity. Been checking everything a million times and didn't know about that case convention. Thank you

          – Guerrilla
          2 days ago

















          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%2f267711%2fblock-not-appearing-when-giving-custom-type%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

          Sum ergo cogito? 1 nng

          三茅街道4182Guuntc Dn precexpngmageondP