Perforce Chronicle 2012.2/486814
API Documentation
|
View helper that renders a region using a specified template. More...
Public Member Functions | |
region ($region, $template= 'region.phtml') | |
Render the named/given region. |
View helper that renders a region using a specified template.
Widget_View_Helper_Region::region | ( | $ | region, |
$ | template = 'region.phtml' |
||
) |
Render the named/given region.
string | $region | the id of a region to render. |
string | $template | the template to use. |
{ $view = $this->view; $view->region = $region; $view->widgets = P4Cms_Widget::fetchByRegion($region); // tag the page cache so it can be appropriately cleared later if (P4Cms_Cache::canCache('page')) { P4Cms_Cache::getCache('page')->addTag('p4cms_region_' . bin2hex($region)); } // make the widget context available to the view $widgetContext = new P4Cms_Controller_Action_Helper_WidgetContext; $view->widgetContext = $widgetContext->getEncodedValues(); return $view->render($template); }