I am using Magento 1.9. Let's just say the documentation and community support is extremely lacking. I have spent the last week trying to figure out how to make a simple static HTML page for the admin area of Magento. Between incomplete tutorials and outdated documentation, it's a nightmare.
I BELIEVE I am at a point now where the admin page is actually loading, but it's blank so I can't tell. I guess now I am trying to figure out how to tell the system to use the layout for this page. (Again, it's going to be a static HTML page with a paragraph of text and an embedded YouTube video).
Let's get to the work here:
This is my config.xml
: - UPDATED
<config>
<modules>
<Cen_Tutorial>
<version>0.1.0</version>
</Cen_Tutorial>
</modules>
<global>
<helpers>
<cen_tutorial>
<class>Cen_Tutorial_Helper</class>
</cen_tutorial>
</helpers>
</global>
<layout>
<updates>
<tutorial>
<file>pdftutorial.xml</file>
</tutorial>
</updates>
</layout>
<admin>
<routers>
<adminhtml>
<args>
<modules>
<Cen_Tutorial after="Mage_Adminhtml">Cen_Tutorial_Adminhtml</Cen_Tutorial>
</modules>
</args>
</adminhtml>
</routers>
</admin>
</config>
And this is my adminhtml.xml
: - UPDATED
<config>
<menu>
<cen translate="title" module="cen_tutorial">
<title>PDF Tutorial</title>
<sort_order>99</sort_order>
<action>adminhtml/cen_tutorial/index</action>
</cen>
</menu>
</config>
This is my TutorialController.php
: - UPDATED
Now in /app/code/community/Cen/Tutorial/controllers/Adminhtml/Cen/TutorialController.php
:
<?php
class Cen_Tutorial_Adminhtml_Cen_TutorialController extends Mage_Adminhtml_Controller_Action
{
public function indexAction()
{
$this->loadLayout();
$this->renderLayout();
}
}
This is the contents of my /app/design/adminhtml/default/default/layout/pdftutorial.xml
:
<layout>
<adminhtml_cen_tutorial_index>
<update handle="adminhtml_cen_tutorial_index" />
<reference name="content">
<block type="adminhtml/template" name="tutorial" template="cen/index.phtml" />
</reference>
</adminhtml_cen_tutorial_index>
</layout>
And finally, the contents of my /app/design/adminhtml/default/default/template/cen/index.phtml
:
<?php
echo 'Hello, world!';
?>
This entire system and structure seems completely complicated, not well documented, and difficult to do anything with, even something as simple as creating one single use-page. What seems to be the problem with what I've pasted? I am on Magento 1.9.
I forgot to include my Helper class but it's in the source.