Enabling full body text in RSS feed¶
See this example.
Description
Programming RSS feeds on Plone sites
local
Plone can generate RSS feeds from folderish content types (folder / collection). If you want to aggregate content from all the site to RSS feed, you first create a collection content item and then enable RSS feed on this collection content item.
These instructions tell you how to create a RSS feed collection for your Plone site. You can choose what content types ends up to the RSS stream. Also, the aggregator is language aware so that it works correctly on multilingual sites.
First we create a collection which will aggregate all the site content for the RSS feed.
site-feed
You can now preview the content of RSS feed on View tab.
Site actions is the top right link slot on the Plone site. By default, Plone site wide RSS link will appear there if enabled.
Go to portal_actions in ZMI
Go to /portal_actions/site_actions/rss
In URL expression type:
string:${object/@@plone_portal_state/portal_url}/site-feed/RSS?set_language=${object/@@plone_portal_state/language}
This expression will
More about expressions.
Publish collection after the content seems to be right, using the workflow menu on the collection content item.
Test RSS feed by copy-pasting RSS URL from the site action to your RSS Reader, like Google Reader.
portal_syndication
is a persistent utility managing RSS settings. It
provides settings to for formatting RSS feeds (frequency
of updates, number of items).
In Plone 4.3, the
portal_syndication
utility was replaced by a browser view and registry
settings.
The view may be traversed to from any context with
@@syndication-util
.
for example, in Plone 4.2 you check for the ability to syndicate a context like so:
<p class="discreet"
tal:condition="context/portal_syndication/isSiteSyndicationAllowed">
<a href=""
class="link-feed"
i18n:translate="title_rss_feed"
tal:define="here_url context/@@plone_context_state/object_url"
tal:attributes="href string:$here_url/search_rss?${request/QUERY_STRING}">
Subscribe to an always-updated feed of these search terms</a>
</p>
In Plone 4.3, this is updated to look like this:
<p class="discreet"
tal:condition="context/@@syndication-util/search_rss_enabled">
<a href=""
class="link-feed"
i18n:translate="title_rss_feed"
tal:define="here_url context/@@plone_context_state/object_url"
tal:attributes="href string:$here_url/search_rss?${request/QUERY_STRING}">
Subscribe to an always-updated feed of these search terms</a>
</p>
The
syndication-util
view is found in
Products.CMFPlone.browser.syndication.utils
Access /content/synPropertiesForm and publish.
RSS feed content is the content of the folder or special stream provided by the content type.
portal_syndication
uses the following logic to pull the content:
if hasattr(obj, 'synContentValues'):
values = obj.synContentValues()
else:
values = obj.getFolderContents()
return values
RSS feed is stored in template CMFPlone/skins/plone_templates/rss_template.