Would you find it possible to extend the views_embed_view() function by a parameter to include the contextual links? I'm not an expert to tell, but if it's only possible, please do. Thanks

Comments

Which display do you use form views_embed_view? If you use the embed display it should afaik actually work.

Thanks for getting back on this. I'm not sure though I'm getting the point of your question. I have created a display of type "Page" (out of: Attachment, Block, Page, Feed, System). Then I simply use <?php print views_embed_view('view_machine_name', 'display_machine_name') ?>. The contextual links do not appear. Is that correct way of embedding? Does this answer your question?

You should use the "embed" or the default display if you embed a view somewhere else, but the page display type is not meant to be embedded and both contextual links work as expected.

Sorry if I sound ignorant, but this seems to be the crucial piece of info - what do you mean by "embed display"? Is there an option in the UI that fixes page display type as "embed"?

Status:Active» Fixed

There is an "embed" display, see "Show the embed display in the ui." under admin/structure/views/settings.

Yep, it definitely works! I remember seeing that option but skipping it as unexplainable ;-) This might be an answer to this issue of mine: http://drupal.org/node/1839442

Now, if there was only a way to convert existing displays into embed style... I have a few displays in one View, all of them are meant to be embedded. They differ quite a bit, so Master will not be an option for that.

Two options come to mind:
- something like display conversion (clone display + change its type)
- a checkbox for each display [x] Allow embedding
Which one would make sense to you most?

Status:Fixed» Closed (fixed)

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