/**
  * Returns seo title for current article (if oxtitle field is empty, oxartnum is used).
  * Additionally - if oxvarselect is set - title is appended with its value
  *
  * @param oxarticle $oArticle article object
  *
  * @return string
  */
 protected function _prepareArticleTitle($oArticle)
 {
     $sTitle = '';
     // create title part for uri
     if (!($sTitle = $oArticle->oxarticles__oxtitle->value)) {
         // taking parent article title
         if ($sParentId = $oArticle->oxarticles__oxparentid->value) {
             // looking in cache ..
             if (!isset(self::$_aTitleCache[$sParentId])) {
                 $oDb = oxDb::getDb();
                 $sQ = "select oxtitle from " . $oArticle->getViewName() . " where oxid = " . $oDb->quote($sParentId);
                 self::$_aTitleCache[$sParentId] = $oDb->getOne($sQ);
             }
             $sTitle = self::$_aTitleCache[$sParentId];
         }
     }
     // variant has varselect value
     if ($oArticle->oxarticles__oxvarselect->value) {
         $sTitle .= ($sTitle ? ' ' : '') . $oArticle->oxarticles__oxvarselect->value . ' ';
     } elseif (!$sTitle || $oArticle->oxarticles__oxparentid->value) {
         // in case nothing was found - looking for number
         $sTitle .= ($sTitle ? ' ' : '') . $oArticle->oxarticles__oxartnum->value;
     }
     return $this->_prepareTitle($sTitle) . '.html';
 }