For this example, we use Medium's RSS feeds to integrate articles as virtual pages into our own site.
To start, we create a parent page, e.g.
rssfeed in the
/content folder and inside it an
rssfeed.txt text file.
Let's give our parent page a title and maybe a short intro.
To fetch the virtual children, we create a new
Rssfeed page model which will read the RSS feed and create a virtual child page for each entry on the fly. The
Remote class is our friend and helps us with handling this remote request.
With this new page model in place, we can now render all feed articles in our
rssfeed.php template as if they were regular Kirby children pages.
Each article will automatically get its own subpage. Routing will work out of the box and you can create an
feeditem.php template (as we defined above when setting the child page props) to render each individual article.