ez projects / ezfeedparse
| UNIX name | Owner | Status | Version | Compatible with |
|---|---|---|---|---|
| ezfeedparse | Damien Pobel | stable | 0.2 | 4.x (require eZ Component Feed) |
eZ Feed Parse provides a template fetch function that allows access to RSS or ATOM feeds. This template fetch function uses the component Feed of eZ Components.
This extension provides a module called feed where a function parse is defined. This fetch function takes the feed URL in parameter and return an object that gives access to all propertie of ezcFeed* objects.
{cache-block ignore_content_expiry expiry=7200} {def $feed = fetch( feed, parse, hash( 'rss_url', 'http://ez.no/rss/feed/communitynews' ) )} {foreach $feed.item as $item} <li> <a href={$item.link.0.href|ezurl}>{$item.title.text|wash}</a> </li> {/foreach} {undef $feed} {/cache-block}
{cache-block expiry=7200} {def $feed = fetch( feed, parse, hash( 'rss_url', 'http://www.bioutifoul-photos.net/feed/photo' ) ) $limit = 4} <ul> {foreach $feed.item as $item max $limit} <li> <a href={$item.link.0.href|ezurl}> <img src={$item.enclosure.0.url|ezurl} alt="{$item.title.text|wash}" /> </a> </li> {/foreach} </ul> {undef $feed} {/cache-block}
The template operator attribute() does not work with object returned by fetch( feed, parse ). You'd better use debug-log template operator or check the Feed component documentation.
Release of eZ Feed Parse 0.2
Friday 23 October 2009 23:35
Damien Pobel