Hi all,
For the moment, I'm quite happy with Drupal 5.1 Aggregator. I've tried other RSS reading modules, but for one reason or the other, they don't seem to reliably do what they're supposed to. So, it's on with the Aggregator module.
I was wondering: how can I style its output? There's an aggregator.css in the /modules/aggregator folder. That's a starting point for the looks, but I would rather also work with a .tpl file, similar to what I'm doing with other content types, to influence the structure of the output. But these other content types are all node-based (node-mycontenttype1.tpl.php, node-mycontenttype2.tpl.php etc.). From what I understand, Aggregator is not node-based. So, how to style the structure there??
Is it possible to have an "aggregator.tpl.php" or something? How should it be called, and where should I put it? Also in the theme folder??
Ludo
Comments
Try Firebug for Firefox
For customizing styles, I recommend Firebug for Firefox. It is really a amazing software and very useful tool for debugging style. It will save you lots of time trying to figure out which style files to change to achieve the desired look.
There probably will be a number of way to achieve your goal but I did this way.
I have created a block with following PHP code. I got this from someone and modified it. You can do the same.
Thanks, PolarBear, that
Thanks, PolarBear, that looks like an interesting approach to my problem. Somehow, I prefer working with .tpl files, to keep things swiftly accessible for editing purposes. Blocks are a bit trickier, I experienced the hard way - i.e. one missing bracket can "block" your entire site. But if you first assign the block to one particular node, it's more secure. So, I'll definitely give your suggestion a try. Thanks again!
And if anyone has any .tpl ideas, they're still Most welcome.
Ludo
=-=
Drupal best practices for using block code : http://drupal.org/node/85694
rather then add it to a block add it to a page or a story, to insure it works before adding it to a block. doing so will throw an error rather then shut the site down : )
Advantage of creating block over modifying .tpl file
Another advantage of creating a new block instead of modifying .tpl file is that even if you upgrade your theme files (including .tpl files) you don't have to make changes to the new .tpl files if you have it as a block.
Something to think about.
Several Alternatives
I was looking for this solution as well and came across this post...
http://drupal.org/node/31598
The method I selected was formatting the theme from the template file.
By defining the function phptemplate_aggregator_page_item($item) in my template.php file.
To start, open your aggregator module and copy the existing theme_aggregator_page_item function and paste it in your template file.
Then rename it like above and format as you wish.
peace,
michael
Web Developer : RockRiverStar.com : Philadelphia, PA
Technical Architect : Philadelphia, PA
Thanks, Pelicani, that was
Thanks, Pelicani, that was the approach I was actually looking for! I followed your instructions, and it works like a charm. Thanks again!
Ludo