$view = views_get_view('my_view_name','display_delta');
$view = views_get_view('my_view_name','display_delta');
$view->render();
if ($view->result)
{
$view_contents = views_embed_view('my_view_name','display_delta');
$title = $view->display['display_delta']->display_options['title'];
$output.= "$title
";
$output.= $view_contents;
$output.= "";
}
Do remember
views_get_view gives you the view object.view->render();
is a function to render the view so that you get the result of the view and other values.- Once view->render() is executed, you can get the result from view->result;
views_embed_view embeds the html output of the view.views_embed_view doesn't give you the title of the view.- To get the title of a view for a particular display use
$view->display['display_delta']->display_options['title'];
No comments:
Post a Comment