Hi
I have a rss feed which contains an element called enclosure which contains a URL to an image:
<enclosure url="http://www.domain.co.uk/images/beer/thu ... c-5825.jpg" length="3800" type="image/gif"/>
I put the following in the template but it does not output the URL:
<img src="{$item.enclosure}">
Any ideas how to get this to work? All help greatly appreciated.
Steve
RSS2HTML - extracting enclosure info from rss feed
Re: RSS2HTML - extracting enclosure info from rss feed
Never used it, but in the img tag I see jpg *and* a gif call. Might be in conflict...
Rolf
Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
-
stevegos
Re: RSS2HTML - extracting enclosure info from rss feed
Thanks for that.
I did notice that but the same rss feed is being used by numerous other web sites who are able to display the jpg image fine and the guy that provides the feed says no one else is reporting any problems.
Steve
I did notice that but the same rss feed is being used by numerous other web sites who are able to display the jpg image fine and the guy that provides the feed says no one else is reporting any problems.
Steve
-
uniqu3
Re: RSS2HTML - extracting enclosure info from rss feed
It doesn't output url as {$item.enclosure} is empty <enclosure/> has no value, what you need is target for enclusre attrubte called url where url is speficied.
Do {$item.enclosure|print_r} and see if array or object or anything that you can target is returned at all, so it would be array you could do {$item.enclosure.url} probably.
Do {$item.enclosure|print_r} and see if array or object or anything that you can target is returned at all, so it would be array you could do {$item.enclosure.url} probably.
-
stevegos
Re: RSS2HTML - extracting enclosure info from rss feed
Thanks uniqu3
{$item.enclosure|print_r} simply outputs the number 1 in every instance. Since my OP I have tried several variations {$item.enclosure.url} but it does not output anything.
Steve
{$item.enclosure|print_r} simply outputs the number 1 in every instance. Since my OP I have tried several variations {$item.enclosure.url} but it does not output anything.
Steve
Re: RSS2HTML - extracting enclosure info from rss feed
Hi there - I am having the same problem extracting an enclosure... Steve did you get anywhere with this in the end?
-
stevegos
Re: RSS2HTML - extracting enclosure info from rss feed
Hi, No I gave up in the end as I just couldn't make it work.
Steve
Steve
Re: RSS2HTML - extracting enclosure info from rss feed
in my case i try {$item|print_r} and received the full array
then i see in array enclosure_url
case is closed
then i see in array enclosure_url
case is closed


