Jump to content

RSS Feed with images


melissa_boyle
 Share

Recommended Posts

Hi Guys,

I have successfully implemented the RSS feed module, however I need to feed some images through can anyone help with this?

At the minute I have:

     <?php

  // retrieve the RSS module
  $rss = $modules->get("MarkupRSS"); 

  // configure the feed. see the actual module file for more optional config options.
  $rss->title = "Latest updates";
  $rss->description = "The most recent pages updated on my site"; 

  // find the pages you want to appear in the feed. 
  // this can be any group of pages returned by $pages->find() or $page->children(), etc. 
  $items = $pages->find("limit=10, sort=-modified"); 

  foreach($items as $item) {
      $item->title = $item->title;
  }

  $rss->render($items);

  ?>     
 
The image field is called blog_images and I know I need to include it within the foreach but im a bit stuck.
 
Any help would be greatly appreciated.
 
Mel
 
 
$item->blog_image =  $item->blog_image;
Edited by LostKobrakai
Added codeblocks
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...