Search code examples
iframerssexpressionengine

Showing The Three Most Recent RSS Articles on External Site


For a site I am building, the news section is essentially an embedded iframe from the company's PR firm. The site also has a sidebar where we would like to display the three most recent article titles from the PR's RSS feed (which is the same thing as the embedded iframe). When clicked, they would need to lead to the news page and then call the target "news_window" that is associated with the news iframe. I need some help figuring out how to show the titles of the three most recent articles from the PR's RSS feed onto my site? I am using ExpressionEngine if that makes any difference (but the RSS feed is external and not through EE).


Solution

  • Andrew,

    If you're using ExpressionEngine 2.x, the Magpie RSS plugin should be installed by default, if you're using ExpressionEngine 1.x, you'll need to download it.

    Once you have that installed, it should be pretty easy to create a list of links:

    {exp:magpie url="http://feed-url.com/rss" limit="10" refresh="720"}
        <ul>
            {items}
                <li><a href="{link}">{title}</a></li>
            {/items}
        </ul>
    {/exp:magpie}
    

    You can find more documentation in the Plugin's documentation in ExpressionEngine or on the download page.

    Wes