Question

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.

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top