first create a controller suppose controller name is "test".
put this code here action name is "name".
<?php
class namespace_modulename_TestController extends Mage_Core_Controller_Front_Action{
public function nameAction()
{
$this->loadLayout();
$this->renderLayout();
}
}
?>
after controller creation set layout go to design->template->layou open the xml file
put these code
<modulename_controllername_actionname>
<reference name="root">
<action method="setTemplate"><template>page/1column.phtml</template></action>
</reference>
<reference name="content">
<block type="core/template" name="getallcustomer_test" template="getallcustomer/test.phtml"/>
</reference>
</modulename_controllername_actionname>
and last send request for controller "modulname/controller/actionname".
print the all data of test.phtml file.
put this code here action name is "name".
<?php
class namespace_modulename_TestController extends Mage_Core_Controller_Front_Action{
public function nameAction()
{
$this->loadLayout();
$this->renderLayout();
}
}
?>
after controller creation set layout go to design->template->layou open the xml file
put these code
<modulename_controllername_actionname>
<reference name="root">
<action method="setTemplate"><template>page/1column.phtml</template></action>
</reference>
<reference name="content">
<block type="core/template" name="getallcustomer_test" template="getallcustomer/test.phtml"/>
</reference>
</modulename_controllername_actionname>
and last send request for controller "modulname/controller/actionname".
print the all data of test.phtml file.
No comments:
Post a Comment