Documentation 2.x and 3.x

RSS module

How to use default RSS module

Generate RSS link

ImpressPages CMS has an integrated and ready to use RSS module. To generate a link to RSS feed in your theme (by default, ip_themes/lt_pagan/main.php) use this code:

<?php 
$rssZone = $site->getZoneByModule('administrator', 'rss');
echo $rssZone->generateRssLink(); //all website RSS
?>

If you want to generate a separate RSS links for each of your zones you can do that using the following code:

<?php 
$rssZone = $site->getZoneByModule('administrator', 'rss');
echo $rssZone->generateRssLink('left'); //RSS of particular zone. Replace 'left' to any zone name
?>

You can generate a link even to RSS of subtree of a zone:

<?php 
$rssZone = $site->getZoneByModule('administrator', 'rss');
echo $rssZone->generateRssLink('left', $parentMenuElementId); //RSS of particular zone subtree
?>

Which pages are included into RSS

By default pages are not included in RSS. For page to appear in RSS you need to tick RSS checkbox in page properties. You can find it in "Advanced" tab of Menu Management.

You can create a list of zones that should be included into RSS by default. This option is in tab Developer -> Modules Config. Press "Menu Management" on the left, then "Options" on the right and add required zones in "Auto RSS" parameter value field. One zone key per line (no spaces). After that new pages created in those zones will be automatically included into RSS.

RSS and custom zones

RSS module supports all kinds of zones. They doesn't have be only Content Management zones, too. You can use your own created zone. RSS will automatically include all elements (pages) from your custom zone that returns true in their getRss() method and 'default' in getType() method.

Write a comment

You must be logged in to comment.