I assume it's a case issue. Magento Controller Class Matching would match your marketplaceimporter_index
against .../Marketplaceimporter/IndexController.php
A common mistake is then to name the Directory like the module MarketplaceImporter
(with a capital I).
The easiest way would be to just rename the Controller Directory. I think it's also possible to use CamelCase in the Controllers Full Action Name
should be something like this:
<layout>
<adminhtml_marketplaceImporter_index>
<reference name="content">
<block type="joaobeno_marketplaceimporter/adminhtml_marketplaceimporter_index" name="templateBlock" template="marketplaceimporter/advancedimporterbackend.phtml"/>
</reference>
</adminhtml_marketplaceImporter_index>
</layout>
You can also dump the Full Action Name to use in the Layout in your Controller with $this->getFullActionName()
or get the css class from the body Tag and replace the -
with _
If this does not help, we might need some Controller and Block Code to help you further.
===UPDATE===
Turns out it wasn't the case issue, but the full action name was missing an _index at the end.
The Full Action Name is built from the module, that the controller belongs to, the Class Path under the controllers directory + the actual Controller Name and Action Name.
1. Module (adminhtml_marketplaceimporter_index_index):
In your case, the module beeing responsible is the adminhtml module (defined in your config.xml routers config - first tag under routers).
This is the first Part of the full action name: adminhtml_marketplaceimporter_index_index
2. Class Path or Subdirectory (adminhtml_marketplaceimporter_index_index)
The next part can be found under the Class Path, that is defined in your routers config (Joaobeno_MarketplaceImporter_Adminhtml
) defined in your config.xml.
The first part identifies your Module
Joaobeno_MarketplaceImporter_Adminhtml.
Since it is a controller, Magento will look for it in the controllers
Subdirectory.
The _Adminhtml
then identifies the Subdirectory under controllers. So now you know, that the controller lies under Joaobeno/MarketplaceImporter/controllers/Adminhtml
and the class Name starts with Joaobeno_MarketplaceImporter_Adminhtml
From here, I think it is up to you how to proceed. A common practice is then to use your Module Namespace and Name as Directory Structure to not accidently overwrite other modules controllers under adminhtml. This would result in the Directory (with the case problem in Mind):
Joaobeno/MarketplaceImporter/controllers/Adminhtml/Joaobeno/Marketplaceimporter
or in your case only using the module name:
Joaobeno/MarketplaceImporter/controllers/Adminhtml/Marketplaceimporter
This Directory Structure defines the next part from the Full Action Name: adminhtml_marketplaceimporter_index_index
3. Controller Name and Action Name (adminhtml_marketplaceimporter_index_index)
The next Part is defined by the controller name (IndexController
) adminhtml_marketplaceimporter_index_index
and the last part is defined by the action name (indexAction
) adminhtml_marketplaceimporter_index_index
The layout.xml in your case should then be like this I think:
<layout>
<adminhtml_marketplaceimporter_index_index>
<reference name="content">
<block type="joaobeno_marketplaceimporter/adminhtml_marketplaceimporter_index" name="templateBlock" template="marketplaceimporter/advancedimporterbackend.phtml"/>
</reference>
</adminhtml_marketplaceimporter_index_index>
</layout>
Best Answer
Well, I reckon the tag between
<modules>
and<files>
should be the entire module name with the vendor name, in your case it seems to only be the module name.So if your module is
Test_Test
I reckon yourconfig.xml
code should be: