The magic tabs have been working great! I have been able to call in my views and have the following code:
function magic_tabs_example_callback($active = 0) {
$tabs[] = array(
'title' => t('Events'),
'content' => theme('view', 'Tabs_Events'),
);
$tabs[] = array(
'title' => t('News'),
'content' => theme('view', 'Tabs_News'),
);
$tabs[] = array(
'title' => t('Stay Informed'),
'content' => t('<p>Content of Stay Informed</p>'),
);
return $tabs;
}
For the "Stay Informed" tab I'd like to call in a block that is created by the simplenews module. I tried various ways using the "custom block" method but didn't have any luck b/c the $bid isn't equal to a number. For instance, when I mouse over "configure" to get the block id of my simplenews block, I get the following path: /admin/build/block/configure/simplenews/newsletter-4 instead of the usual "/admin/build/block/configure/block/82" for custom blocks.
How can I adapt the following code to call in the simplenews block:
$bid = 2;
$block = (object)module_invoke('block', 'block', 'view', $bid);
$block->module = 'block';
$block->delta = $bid;
$tabs[] = array(
'title' => t('Stay Informed'),
'content' => theme('block', $block),
);
Any help is GREATLY appreciated!
Comments
Comment #1
corydorning commentedNevermind, I FIGURED IT OUT! My code for the last tab is as follows:
Comment #2
corydorning commentedsee above.
Comment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.