Quantcast
Viewing all articles
Browse latest Browse all 4

Answer by cdmo for How to override aggregator_block_view() in the aggregator module?

UPDATED

My initial answer was off. You may use the following to adjust the html around an individual item in your Feeds Aggregator Block:

/** * Returns HTML for an individual feed item for display in the block. * * @param $variables *   An associative array containing: *   - item: The item to be displayed. *   - feed: Not used. * * @ingroup themeable */function theme_aggregator_block_item($variables) {  // Display the external link to the item.  return '<a href="' . check_url($variables['item']->link) . '">' . check_plain($variables['item']->title) . "</a>\n";}

This resides in aggregator.module. This still doesn't get at modifying aggregator_block_view() which is what puts the 'item' wrapping around each feed item. I guess you could do a hook_block_view($delta= '[the delta of the block you want to modify]') and then copy the contents of the aggregator_block_view and modify the part where theme('item_list') is used and replace it with one of the other default wrappers (see some here http://api.drupal.org/api/drupal/modules%21system%21theme.api.php/group/themeable/7) or create your own?


Viewing all articles
Browse latest Browse all 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>