Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Currently the aggregator module does not provide fine grained template suggestions for its blocks. The normal path for overriding block themes is insufficient (e.g. removing the Read More link for a specific feed/category). A simple reorganization provides the support needed. Will have a patch posted ASAP for review.
Comment | File | Size | Author |
---|---|---|---|
#2 | aggregatortheming-1130902-2.patch | 4.52 KB | 20th |
#1 | aggregatortheming-1130902.patch | 1.71 KB | dcousineau |
Comments
Comment #1
dcousineau CreditAttribution: dcousineau commentedIncluded patch to introduce block template suggestions
Comment #2
20th CreditAttribution: 20th commentedHi! Maybe there will be even more control over theming, if this block returns a renderable array instead of a string, as it should. That way there will be no need for overriding theme to remove the Read More link, as it could be done simply in a hook_block_view_alter().
Also, I think it is already too late to make this sort of changes in D7.
Comment #3
fprevos2 CreditAttribution: fprevos2 commentedCould something like this be done for Drupal 6? I would like to theme each the feeds items with a different theme for each feed.
Thank you
EDIT:
I made the following change to aggregator to use template file for items. I'm currently unable to get the core using git to make a proper patch.
Add a line in the function aggregator_theme:
Add the following code:
After the change I create a default template file (aggregator-block-item.tpl.php) that output the same as the function theme_aggregator_block_item.
You can now create a new template file for each feed (name your file aggregator-block-item-x.tpl.php where x is the feed number).
Comment #4
mohan gowda CreditAttribution: mohan gowda commentedcan you please elaborate more on this.
I am trying to redefine my template as shown in the below pattern.
The main heading of the block
that is the requirement is to indent the subheading.
please help me out to get user defined block.
Comment #5
ParisLiakos CreditAttribution: ParisLiakos commentedThis should go in d8 first, please dont change versions
closed #1877830: Possibility for a theme to hook item_list only for Aggregator module as duplicate
Comment #18
quietone CreditAttribution: quietone at PreviousNext commentedThe
aggregator
module has been removed from Core in10.0.x-dev
and now lives on as a contrib module. Issues in the Core queue about theaggregator
module, like this one, have been moved to the contrib module queue.Comment #19
larowlanNow these are entities, there are preprocessing hooks