getConfig('type')) { $this->_action = 'subpages'; } return parent::exec(); } protected function _doView() { $item = array( 'siteMap' => Qs_SiteMap::get4Userend(), 'tpl' => $this->getTemplate('view.tpl') ); $item['siteMapPagesCount'] = App_Cms_Obj::getInstance()->getSiteMapPageCount($item['siteMap']); $this->_addItem($item); return $this; } protected function _doSubpages() { $item = $this->getSideBlockItem(); $item['tpl'] = $this->getTemplate('subpagesPageBlock.tpl'); $this->_doc->addItem($item); } public function getSideBlockItem(array &$blockData = array()) { $config = $this->_config->toArray(); $pageId = isset($config['pageId']) ? $config['pageId'] : null; if (!$pageId) { return null; } $item = array(); $item['page'] = current(Qs_SiteMap::find(array('id' => $pageId))); if (!$item) { return null; } $item['tpl'] = $this->getTemplate('subpagesSideBlock.tpl'); return $item; } }