// IndexController.php
public function widgetenabledoutputAction() {
$html = "<ul>";
for ($i = 1; $i <= 5; $i++) {
echo "<li>Item $i</li>";
}
$html .= "</ul>";
$this->view->html = $html;
}
// index action view script (index.phtml), notice we are not calling widgetenabledoutputAction but can get output from it
echo $this->action(
$action = "widgetenabledoutput",
$controller = "index",
$module = null,
array(
"itemsPerPage" => 2 // can pass params as array
)
);