2

I'm trying to load a simple template in the Magento 2 admin panel but the error I get in the system.log is:

main.CRITICAL: Invalid template file: 'Test_Main::dashboard/index.phtml' in module: 'Test_Main' block's name: 'test.dashboard.index' [] []

My Controller class is:

Test\Main\Controller\Adminhtml\Dashboard\Index.php

My Block class is:

Test\Main\Block\Adminhtml\Dashboard.php

My layout file is:

Test\Main\view\adminhtml\layout\test_dashboard_index.xml

My template file is:

Test\Main\view\adminhtml\template\dashboard\index.phtml

Any help would be greatly appreciated.

4

Folder for templates is Test\Main\view\adminhtml\ templates \dashboard\index.phtml not Test\Main\view\adminhtml\ template \dashboard\index.phtml

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.