How to embed views in magic_tabs using views2
txcrew - February 12, 2009 - 15:31
| Project: | Magic Tabs |
| Version: | 6.x-1.0 |
| Component: | Documentation |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
Greetings,
I am aware of how to embed using Views 1.x but during the upgrade process to D6 I have to upgrade my magic_tabs layout as well.
I tried using the code:
<?php
function magic_tabs_mytabsname_callback($active = 0) {
$view = views_get_view('myviewname');
$tabs[] = array(
'title' => t('Active'),
'content' => print $view->execute_display('default', '3'),
);
$tabs[] = array(
'title' => t('Upcoming'),
'content' => 'some more content',
);
return $tabs;
}
?>Which should return all items in taxonomy tid 3. It does, but it seems to display the results outside of the tabs or will display weather or not the tabs is selected.
Any ideas on the direction to go would be very helpful.
TIA, txcrew

#1
Sorry for the premature post, I seemed to have figured it out:
Changing this line
<?php'content' => print $view->execute_display('default', '3'),
?>
to this
<?php'content' => $view->execute_display('default', '3'),
?>
produced the desired results.
txcrew
#2
Automatically closed -- issue fixed for 2 weeks with no activity.
#3
I would like to insert a view also. Where do you enter the view name ?
#4
#5
$view = views_get_view('myviewname');Now I see#6
Enjoy :)
#7
but how it's possible to pass arguments to the view ?