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:

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

Comments

Anonymous’s picture

Title: How to embed using views2 » How to embed views in magic_tabs using views2
Status: Active » Fixed

Sorry for the premature post, I seemed to have figured it out:

Changing this line
'content' => print $view->execute_display('default', '3'),
to this
'content' => $view->execute_display('default', '3'),

produced the desired results.

txcrew

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

tommytom’s picture

I would like to insert a view also. Where do you enter the view name ?

tommytom’s picture

Status: Closed (fixed) » Active
tommytom’s picture

$view = views_get_view('myviewname'); Now I see

yhager’s picture

Status: Active » Closed (fixed)

Enjoy :)

tommytom’s picture

but how it's possible to pass arguments to the view ?