Search code examples
parsingformattingrsssimplepie

SimplePie Parsing - Create List From Content


I'm using the RSSSimplePie plugin on CMS Made Simple.

The feed I am using is this Tide Times. I would like to display the times and heights as an inline list? At present each item has a br tag so starts on a new line.

The template I have is this:

<div class="feeds">{foreach from=$feeds item=onefeed}
<div class="feed-content">
    {$onefeed->get_content()}
</div>
{/foreach}</div>

Solution

  • You probably will need to create a plugin or pass it to a UDT for parsing in PHP.

    Using http://php.net/manual/en/function.preg-match.php should be able to quick parse and pull out the variables that you need.