Dude, let me show you how I will be a future Magento expert. Therefore, the expert says:
In your configuration
<menu1 translate="title" module="magecrmsync"> <title>Synchronize</title> <sort_order>999</sort_order> <children> <menuitem1 module="magecrmsync"> <title>Synchronize</title> <action>magecrmsync/adminhtml_magecrmsync</action> </menuitem1> </children> </menu1>
- action node represents your controller So your directory should be in Magecrmsync / controller / Adminhtml / MagecrmsyncController * make sure it extends the right class
now in this controller you call loadlayout () β this guy will just load all the layout.xml files and save it in memory and renderlayout () β this guy does the actual printing of the material.
But wait a minute. loadlayout () above does not know about our layout.xml of this our custom extension. No problem allows you to create it. So just go to design-> adminhtml-> package-> theme-> layout and put your layout.xml, which in your case is .... it's ..... oh, you don't have it in your config file .xml (since layout.xml for the administrator needs to be in the adminhtml node, you have one, but it looks like an interface, but still it isnβt because you donβt have a node interface.) Anyways suggests you might have received this so far and received a new xml layout file for you admin and put it in the adminhtml node. eg
<adminhtml> <layout> <updates> <services> <file>layitoutdarling.xml</file> </services> </updates> </layout> </adminhtml>
Now this our new layoutitoutdarling file will reference or we can point to the classes we need for our journey. This layout file will keep a secret in what you need. yes, what will he have ????? he will have ..... Handles: -S Handles correspond to you URL (or the path to your module / controller / method) and call the material enclosed between them. for example, in this random example, there will be a handle, when you go to this block of URL block, it will be called whose path is Employee / Block / Adminhtml / Employee.php
<?xml version="1.0"?> <layout version="0.1.0"> <employee_adminhtml_employee_index> <reference name="content"> <block type="employee/adminhtml_employee" name="employee" /> </reference> </employee_adminhtml_employee_index> </layout>
Now, in fact, this file (Employee / Block / Adminhtml / Employee.php) is your Grid container. Then the Grid container will point you to the Grid file (Employee / Block / Adminhtml / Employee / Grid.php). There is a difference between a Grid Container and a Grid.
Forms in magento are divided into two 4 main parts 1. FORM container 2. FORM TOPIC 3. FORM tabs 4. Valid form fields
More info on what I said here
Then, for the tabs, suppose you have placed the Add New Sexy Girl button in the "Grid Container" section. Of course, this will point to (controller) / sexyController / newAction
So now your newAction will tell you to add tabs to the left.
public function newAction(){ $this->loadLayout(); $this->_addContent($this->getLayout()->createBlock('form/adminhtml_form_edit')) (_addLeft() here we are adding tabs) ->_addLeft($this->getLayout()->createBlock('form/adminhtml_form_edit_tabs')); $this->renderLayout(); }
For more information on how to add tabs and more, click here.
Yes, I have only 4 beers and I have 2 left.
Peace my dear friend is checking this site and you will also become like me .. future magento expert.