Hello,

I have an RSS feed being displayed as a block on my front page and I use an image that includes the name of the site that the feed data is coming from.

The aggregator.module requires that you give a Title to a feed in /admin/aggregator/edit/feed/. This title is displayed prior to the feed items. I would like to stop this, and only show the feed items since my image I'm displaying in the block already gives the name of the site the news comes from.

I tried first looking for theme possibilities. I wasn't able to find a themeable function in aggregator.module that would allow this. The closest is theme_aggregator_block_item, which let's you tune the individual link items.

I went into the source for aggregator.module and looked for all items using the h2 tag, since the title is outputted surrounded by these tags. Unfortunately, it appears that the two areas in the source where h2 appears refer to how the feed information is outputted on the administration screens--commenting out these lines did not work.

So, what the heck? How can I get rid of or otherwise format these h2 feed titles? Should I be using aggregator2 instead? Am I missing a themable function in aggregator.module that would solve my problem?

Thanks so much.

rob

Comments

help?

Can anyone help me with this?

space char

I found out that I can use the space character " " as the title and it of course, doesn't show anything.

This is a terribly inelegant solution though. It would be nice to change the code the shows the RSS items, so that they're not in a bulleted listed for instance.

I'd really appreciate any ideas anyone has on this topic, as I can't figure it out.

rob

OK! I think I've got it all

OK!

I think I've got it all figured out, thanks all the help everyone! j/k!

The Aggregator module uses the theme_item_list function to output what you see when you add a an rss feed block to your page. You just need to over-ride this using a template.php file in your theme's directory. For instance, in mine I could use:

<?php
function weekly_davespeak_item_list($items = array(), $title = NULL, $type = 'ul', $attributes = NULL) {
 
$output = '<div class="item-list">';
//  if (isset($title)) {
//    $output .= '<h3>'. $title .'</h3>';
//  }

 
if (!empty($items)) {
   
$output .= "<$type" . drupal_attributes($attributes) . '>';
    foreach (
$items as $item) {
     
$attributes = array();
     
$children = array();
      if (
is_array($item)) {
        foreach (
$item as $key => $value) {
          if (
$key == 'data') {
           
$data = $value;
          }
          elseif (
$key == 'children') {
           
$children = $value;
          }
          else {
           
$attributes[$key] = $value;
          }
        }
      }
      else {
       
$data = $item;
      }
      if (
count($children) > 0) {
       
$data .= theme_item_list($children, NULL, $type, $attributes); // Render nested list
     
}
//Don't use those ugly bullet marks, instead wrap each line in a span.
     
$output .= '<span class="rss_output">' . drupal_attributes($attributes) . ''. $data .'</span><br />';
    }
   
$output .= "</$type>";
  }
 
$output .= '</div>';
  return
$output;
}
?>

You can see: I've commented out the output of the title, and changed how the bullet items appear so that I can use my own css to change the way they look. Hopefully this helps someone else figure this out.

rob