/** * Template variable getter. Returns active content id. * If no content id specified, uses "impressum" content id * * @return object */ public function getContentId() { if ($this->_sContentId === null) { $oConfig = $this->getConfig(); $sContentId = oxConfig::getParameter('oxcid'); if (!$sContentId) { //trying to load content id from tpl variable //usage of tpl variable as content id is deprecated $sContentId = oxConfig::getParameter('tpl'); } if (!$sContentId) { //get default content id (impressum) $sContentId = parent::getContentId(); } $this->_sContentId = false; $oContent = oxNew('oxcontent'); if ($oContent->load($sContentId) && $oContent->oxcontents__oxactive->value) { $this->_sContentId = $sContentId; $this->_oContent = $oContent; } } return $this->_sContentId; }