Embedding RSS feeds in content
This How-to applies to: Any version.
This describes how to embed RSS feed lists within page content
This is a relatively generic method and although you may not think it terribly efficient, it does work fairly well and certainly has no noticable overhead on my systems. (although if you use VERY long pages (>200k?) , you may have speed problems)
Step-by-Step
- Customise the document_view template
- Replace a section of this code as follows;
<div class="stx" tal:condition="text"
tal:attributes="class python:test(here.Format() in ('text/structured',
'text/x-rst', ), 'stx', 'plain')">
<div tal:replace="structure python:here.rss_document_wrap(text)" />
</div> - At which point you will find out if PloneRSS is installed. Essentially this will cause all pages to call rss_document_wrap when the page is rendered.
- Select a test page
- Embed the expression :rss_feed: within the document. If you fail to spell this correctly or if you miss a ':' etc, it will fail to work.
- Try to view the page, it should show any available RSS feed in place of the :rss_feed: label.
- Customise and edit the rss_document_wrap function as appropriate.