protected function _load(array $filter, array $sort) { $data = parent::_load($filter, $sort); if ($filter && count($data) == 1) { $template = reset($data); // Loaded one item, now set this to be the current template $this->setTemplate($template['name'], $template['path'], $data); } return $data; }