Skip to Main Content

RSS Feed in TYPO3 Part 1 - How i never miss any blog posts from F7!

What actually is RSS?

An RSS feed helps you to keep up to date with the latest posts on a website without annoying adverts or an overflowing email inbox. Maybe you already follow F7 on Instagram. Even though we regularly share our blog posts in the stories, they can easily get lost among other content there, although our blog is of course one of the most important. 😉

To subscribe to our RSS feed, all you need is an RSS reader app, which is particularly handy on a smartphone. The file format (XML) is minimalist, resource-saving and extremely efficient. With just one click in the footer of our website, you get direct access to the latest blog posts from F7.

Sounds good, doesn't it?

My first steps - brain­storm­ing

Before I got started straight away, I first had to familiarise myself with the subject matter. It quickly became clear that a good concept is the be-all and end-all when it comes to creating a high-performance, comprehensible and easy-to-read project.

So I got out my pen and paper and started brainstorming. I asked myself the following questions:

  • What data do I need?
  • Where do I get the data from?

I found inspiration in the RSS feed of the New York Times and in the official RSS specification, for example.

The structure of an RSS feed

An RSS feed contains a so-called channel. This contains important basic information:

  • Title of this channel, or the website 
    (for us: TYPO3 Agency F7 | Blog)
  • Link to the website
  • Description explaining the content of the feed
  • Language of the feed
  • Cache date, which indicates when the feed was last updated

In addition, the RSS feed lists all our blog posts as so-called items. The following information is required for each item:

  • Title of the blog article
  • Direct link to the article
  • Description of the content
  • Publication date
  • Optional: an image

Data sources - which and where from?

One of the main challenges was to identify the right data and create a database query. I drew inspiration for this from existing solutions. One example is the TYPO3 News Extension by Georg Ringer. With the help of Google and my research, it became clear that the configuration had to look like this:

  1. Create a new PageType configuration in Typoscript and map it to /rss.xml in the SiteConfig
  2. Set up a database query to obtain the required content in the appropriate language
  3. And then output via a Fluid Template

In the second part, we'll get down to implementation!