Closed (fixed)
Project:
Simplenews
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
10 Mar 2007 at 15:57 UTC
Updated:
21 Jan 2008 at 08:48 UTC
I tried the insert the simplenews block's content with function module_invoke with no results.
The blocks of other modules work with this method, but the block of simplenews simply doesn't work.
What can be the cause?
PS
I tried to create a block that contains a picture and the content of simplenews block.
Is there any other possibility to do this?
the code from the custom block i tried to create is:
print '<img src="'.base_path().'files/logo.jpg" />';
$block = module_invoke('simplenews', 'block', 'view',0);
print $block['content'];
Comments
Comment #1
sutharsan commentedYour almost there. This works on HEAD and no doubt it will work on 5.x-1.x-dev too:
The last parameter of the function call must be newsletter-tid where 'tid' is the term id of the applicable newsletter group.
Comment #2
mishhh commenteddmitrig01 from #drupal-themes mirc channel kindly found the solution:)
you have to do as such:
1. go to administer->site building->blocks and click "configure" on newsletter block. You look at the url. The last portion of it is something like "newsletter-xx", where xx is the taxonomy id (tid) of the newsletter i guess.
2. write some php code wherever you want to put the content of the block
It should work now:)
Comment #3
sutharsan commented