/** * Method to get a reference to the current view and load it if necessary. * * @param string $name The view name. Optional, defaults to the controller name. * @param string $type The view type. Optional. * @param string $prefix The class prefix. Optional. * @param array $config Configuration array for view. Optional. * * @throws Exception * * @return F0FView Reference to the view or an error. */ public function getView($name = '', $type = '', $prefix = '', $config = array()) { if (array_key_exists('layout', $config) && strpos($config['layout'], 'channel-post') > 0) { $type = 'raw'; } return parent::getView($name, $type, $prefix, $config); }