By vivianspencer on
I was wondering if there is a way to display a feed icon in an aggregator block
I know I can do this by hard coding the feed icon into each aggregator block, but I don't want to do this as it would mean making changes to the template each time the feed changes
I've looked through the api and I found the following function: http://api.drupal.org/api/function/aggregator_block/6 which creates the content for the block. Is there any way to override this function?
Comments
Create a
Create a block-aggregator.tpl.php file in your theme and load the feed info. Here is mine:
Any other steps needed for block-aggregator.tpl.php?
Having a lot of trouble getting block-aggregator.tpl.php to stick. Is there anything else that needs to be done?
You may need to rebuild your
You may need to rebuild your theme registry. See http://drupal.org/node/173880#theme-registry
I'm sorry but after rebuild
I'm sorry but after rebuild theme registry, block-aggregator.tpl.php still not used ?
--- nevermind, it solved now.
Any idea how I can make the
Any idea how I can make the block look like the aggregator node output?
This is aggregator-item.tpl.php which displays the node.
Sorry, I don't really
Sorry, I don't really understand what you're asking. What is it you are unable to do exactly?
When you create a new Feed
When you create a new Feed Aggregator entry, both a block and node are created.
The block will display feed content in a list, but only shows titles as a link. It also has a "more" link to the node page.
The node will display all content from the feed (title, link, pubDate, image, etc.). Typically the url to this page is www.yoursite/aggregator/sources/1
Construction of this page is done by the aggregator-item.tpl.php which can be found in the aggregator module dir.
What I'm trying to do is create my own template for the BLOCK, using a format similar to the fields used in the node.
The block template will not
The block template will not give you access to how each aggregator item is displayed. If one template were to do that it would be aggregator-item, but it looks like that's not receiving the information or it would be spitting it out (ie, "if ($content)" seems to return false). If what you want to do is add some content below each title, I think you'll need to use theme_aggregator_block_item().
See: http://api.drupal.org/api/function/theme_aggregator_block_item/6
Try adding $item->description in there under the title.
Hope that helps, I'm not too familiar with this part of drupal myself.
im having exactly the same
im having exactly the same problem as Tytest
Did you try my suggestion
Did you try my suggestion above?
Suggestions?
Suggestions?