Skip to content
Snippets Groups Projects
Commit 4d76c5c2 authored by daspeter's avatar daspeter Committed by Wolfgang Ziegler // fago
Browse files

Issue #2340487 by das-peter: Views Row Plugin "Rendered entity" should add reference to the view

parent a2bce8f3
No related branches found
No related tags found
No related merge requests found
...@@ -88,6 +88,9 @@ class entity_views_plugin_row_entity_view extends views_plugin_row { ...@@ -88,6 +88,9 @@ class entity_views_plugin_row_entity_view extends views_plugin_row {
public function render($values) { public function render($values) {
if ($entity = $this->get_value($values)) { if ($entity = $this->get_value($values)) {
// Add the view object as views_plugin_row_node_view::render() would.
// Otherwise the views theme suggestions won't work properly.
$entity->view = $this->view;
$render = $this->rendered_content[entity_id($this->entity_type, $entity)]; $render = $this->rendered_content[entity_id($this->entity_type, $entity)];
return drupal_render($render); return drupal_render($render);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment