i am just reading on zend view action helpers on zend framework docs. so i created an index action
// index.phtml
...
echo $this->action(
$action = "widgetenabledoutput",
$controller = "index",
$module = null,
array(
"noLayout" => true,
"itemsPerPage" => 15
)
);
// index controller (IndexController.php)
public function widgetenabledoutputAction() {
$noLayout = $this->getRequest()->getParam("noLayout");
$itemsPerPage = $this->getRequest()->getParam("itemsPerPage");
if ($noLayout) { // i made this such that this page/action can be displayed with layout and without.
$this->_helper->layout->disableLayout();
}
$html = "<ul>";
for ($i = 1; $i <= $itemsPerPage; $i++) {
echo "<li>Item $i</li>";
}
$html .= "</ul>";
$this->view->html = $html;
}
the error i got was that in the index action, index.phtml, my intention was to get the output (list) of widgetenabledoutputAction
not the layout of widgetenabledoutputAction
but i want the layout of indexAction
does it make sense? am i doing something wrong? or must i make a delicated action for something i want to use a action helper from?