'sorter ASC'); protected function _init() { parent::_init(); $params = $this->getRestParams(); $this->_listOptions['defaultIpp'] = 4; if (count($params) == 1 && is_numeric($params[0])) { $this->dataObj->setPrimaryKey($params[0]); $this->_defaultAction = 'view'; } } protected function _doView() { $item = $this->dataObj->getData(); $item['tpl'] = $this->getTemplate('view.tpl'); $item['backUrl'] = CURRENT_PAGE_FINAL; //$item['backUrl'] = $this->_getBackUrl(CURRENT_PAGE_FINAL); if ($item['backUrl'] == '') { $item['backUrl'] = CURRENT_PAGE_FINAL; } $this->_addItem($item); } public function writeXmlSitemap($xml) { if ('default' != $this->getConfig('type', 'default')) { return $this; } $stmt = $this->dataObj->getListStatement4XmlSitemap(); $pageUrl = ('y' == $this->doc->getOption('isSecure')) ? BASE_URL_HTTPS : BASE_URL_HTTP; $pageUrl .= '/' . $this->doc->getOption('fullAlias'); while ($item = $stmt->fetch()) { $xml->writeUrl($pageUrl . '/' . $item['id']); } return $this; } }