views:

257

answers:

1

Yes, I am still on Drupal 5. Don't make fun.

I created a category with the Aggregator module, and the URL for the category is www.example.com/aggregator/categories/2. How do I theme this? Is it a node that can be themed with a template, or is there some other process I must use?

edit: To clarify, I want to add some text right below the header, not just theme the individual aggregator items. Sorry, I left that out at first.

+1  A: 

have a look at the source (always helpful):

voila, here is your themeing point (theme override), which can be themed with a template (or a custom theme function).

EDIT: themeing / modifying the header seems to be difficult with standard Drupal 5. look at the source again: _aggregator_page_list() just concats all (themed) feed items, wraps them in a <div id="aggregator">, and adds pager and feed icon - nothing to hook into here. _aggregator_page_list() has a optional 3rd argument $header which would do exactly what you want - unfortunately, this argument isn't used for aggregator/categories/2. so to add some text to the header, you would have to hack aggregator.module.

or upgrade to Drupal 6, which added a theme override for the wrapper:

foreach ($items as $item) {
  $output .= theme('aggregator_item', $item);
}
$output = theme('aggregator_wrapper', $output);

EDIT END

for how to theme Drupal 5, see http://drupal.org/theme-guide/5 , template.php: Overriding other theme functions, Proper theming of aggregator module, theme() api doc, etc. etc.

good luck!

* and adds some category handling and wraps all the items into one or the other container

ax
Bah, I missed the theme() function call. I understand that I can use that to theme each individual feed item, but I want to insert some text at the top of the page, right below the header. Is there a way to override the theme_aggregator_page_list function to theme the output of the whole page?
Jergason
it should be, but apparently it isn't: theme_aggregator_page_list() seems to be never used (there is no single call to theme('aggregator_page_list') in aggregator.module). see my updated answer for the alternatives.
ax