function toHtml($oContent, $oPage)
 {
     $aoContentClasses = array();
     $asContentClassNames = $oContent->getContentFieldValues(self::FIELD_CONTENTCLASS);
     foreach ($asContentClassNames as $sContentClassName) {
         $oContentClass = AnwContentClasses::getContentClass($sContentClassName);
         $aoContentClasses[] = $oContentClass;
     }
     unset($asContentClassNames);
     //get feed items
     $aoMatchingPages = AnwStorage::fetchPages($oContent->getContentFieldValues(self::FIELD_MATCH, true), $aoContentClasses, array($oPage->getLang()), $oContent->getContentFieldValue(self::FIELD_LIMIT), AnwUtils::SORT_BY_TIME, AnwUtils::SORTORDER_DESC);
     $aoFeedItems = array();
     foreach ($aoMatchingPages as $oMatchingPage) {
         $oFeedItem = $oMatchingPage->toFeedItem();
         $aoFeedItems[] = $oFeedItem;
     }
     if (AnwEnv::_GET(self::GET_FEED) != AnwFeed::TYPE_RSS2) {
         $sUrlRss = AnwUtils::link($oPage, "view", array(self::GET_FEED => AnwFeed::TYPE_RSS2));
         //show feed info
         $oOutputHtml = new AnwOutputHtml($oPage);
         $oOutputHtml->setTitle($oContent->getContentFieldValue(self::FIELD_TITLE));
         $sHtmlItems = "";
         foreach ($aoFeedItems as $oFeedItem) {
             $sHtmlItems .= $this->tpl()->feedItem($oFeedItem->getTitle(), $oFeedItem->getLink());
         }
         $sHtmlBody = $this->tpl()->feedInfo($oContent->getContentFieldValue(self::FIELD_TITLE), $oContent->getContentFieldValue(self::FIELD_DESCRIPTION), $sUrlRss, $sHtmlItems, $oPage->getLang());
         $oOutputHtml->setBody($sHtmlBody);
         // load contentclass CSS
         $sHtmlHead = $this->getCssSrcComponent(self::CSS_FILE);
         $sHtmlHead .= $this->tpl()->headRss($sUrlRss, $oContent->getContentFieldValue(self::FIELD_TITLE));
         $oOutputHtml->setHead($sHtmlHead);
     } else {
         $sUrlRss = AnwUtils::linkAbsolute($oPage, "view", array(self::GET_FEED => AnwFeed::TYPE_RSS2));
         //export to rss
         $oFeed = new AnwFeed(AnwFeed::TYPE_RSS2, $oContent->getContentFieldValue(self::FIELD_TITLE), $sUrlRss, $oContent->getContentFieldValue(self::FIELD_DESCRIPTION));
         foreach ($aoFeedItems as $oFeedItem) {
             $oFeed->addItem($oFeedItem);
         }
         $oFeed->output();
     }
     return $oOutputHtml;
 }