Hello,

Just wondering what the difference is between:

$view = views_get_view('viewname');
print $view->execute_display('default', $args);

and:

print views_embed_view($viewName, $display_id, $args);

Any ideas?

Cheers...

Comments

Anonymous’s picture

This looks like shorthand. Basically, instead of doing it in two steps because the second statement defines the view to modify and passes in the the other parameters.

ludo1960’s picture

You sure?

Merlin duplicating code! Must be more to it than that....

sharonknieper’s picture

I ran into merlin posting on this old thread (http://drupal.org/node/246742#comment-4241898) and he says never use execute_display() to embed a view.