una
una copied to clipboard
RSS feeds: add ability to parse replace markers in RSS URLs
To do it we need to pass 'id' and 'content_it' GET variables, so we can initiate Page object and replace markers, for example:
class BxDolRssPageBlock extends BxTemplRss
{
...
public function getUrl($mixedId) {
$oPageQuery = new BxDolPageQuery(array());
$aBlock = $oPageQuery->getPageBlock($mixedId);
if (!$aBlock)
return false;
$oPage = BxDolPage::getObjectInstance($aBlock['object']);
if (!$oPage)
return false;
return $oPage->getBlockRssUrl($aBlock);
}
where getBlockRssUrl method:
class BxBasePage extends BxDolPage
{
...
public function getBlockRssUrl ($aBlock)
{
list( $sUrl, $iNum ) = explode('#', $aBlock['content']);
echoDbg(get_class($this));
return $this->_replaceMarkers($sUrl);
}