By ALT83 on
Hi,
I'm using the frontpage.module which means I need to manually invoke certain blocks to display them. The following format has worked for me for Views.module blocks and Tagadelic blocks, but doesn't seem to work for the standard Aggregator.module, any thoughts what I'm doing wrong?
I'm trying to display the latest news from the 1st feed I added (which has a CSS id of #block-aggregator-feed-1).
$block = module_invoke('aggregator-feed', 'block', 'view', 1);
print $block['content'];
Thanks,
Alex
Comments
...
It should be:
First, you need to call the
aggregatormodule, not the non-existentaggregator-feedmodule. Second, this specific module expects block IDs of the formfeed-norcategory-n.When you see a string of the form "#block-aggregator-feed-1" you should keep in mind that is stands for "#block-some_module_name-some_block_id".
Perfecto thanks! :)
Perfecto thanks! :)
and to pull in a little more functionality?
This thread has answered my initial question (how to invoke a particular block when not using a real theme) and whetted my appetite for a step further: I'm using the simplenews module, and following your snippet, I now successfully see the output of the simple news module block on the page:
but how to get the module to actually receive and process the subscription's form post?
This is for a one-time, front_page-only bandage page while the rest of the site is being developed behind the scenes.
--
http://drupaltees.com
80s themed Drupal T-Shirts
oh.
quick update here.. I think module_invoke is enough (right?), and that I'm actually having problems with the configuration of the module itself. I will post back here if I discover anything new, but if anyone sees my folly based on what I provided, I am of course all ears!
--
http://drupaltees.com
80s themed Drupal T-Shirts
doesn't work...
Any idea why this wouldn't work? I'm using this code inside a block, to pull in several different block views of news feeds and display them in a single (manually added) block. This works fine with views, but I also can't find any way to bring the aggregated news items into a view. This code works perfectly if I have views set up for local stories, but I'm trying to do the same thing with stories from another site.
P.S. I'm running d5.10.
..nevermind
i uhm.. forgot to change the input method to php. *head-smack*
This is great.
Nice to archive
sharma chelluri
You guys are so smart! Can
You guys are so smart! Can you check out my thread @ http://drupal.org/node/325545 it is about this rss feed stuff which is killing me.
[SITE INTRO][2] Why Re-Create an Open Learning Resource @ TheCenterOfTheNet (Mission Statement) Part 2
subscribe
subscribe
[SITE INTRO][2] Why Re-Create an Open Learning Resource @ TheCenterOfTheNet (Mission Statement) Part 2
More content.
How would you display the content of ../aggregator/sources/1 ?