Wouldn't it be cool to have a area handler which can show any kind of handler?

Assign for myself.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dawehner’s picture

FileSize
3.75 KB

Here is a first approach for a patch.

dawehner’s picture

Status: Active » Needs review

This patch was sponsored by Team WD
Thanks!

Blackice2999’s picture

Status: Needs review » Reviewed & tested by the community

Thanks dereine! - Works as expected fine.

fago’s picture

Status: Reviewed & tested by the community » Needs work

Interesting idea.

However, why restrict the plugin to the entity type we are listing. We could show any possible entity type there. So shouldn't the plugin work for all entity types (i.e. choose the type first), thus be defined "global" to all base tables?

dawehner’s picture

Status: Needs work » Needs review
FileSize
4.94 KB

Oh i was so dazzled by the symmetry of the data, your idea makes absolut sense.

Blackice2999’s picture

Status: Needs review » Reviewed & tested by the community

The Patch from #5 works also fine for me. Tested on current dev branch and works! Thanks dereine.

fago’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/views/entity.views.inc
@@ -63,6 +63,19 @@ function entity_views_data() {
+    'title' => t('Entity'),

Let's call this "Rendered entity" as in other places too.

+++ b/views/handlers/entity_views_handler_area_entity.inc
@@ -0,0 +1,111 @@
+      '#ajax' => array(
+        'path' => views_ui_build_form_url($form_state),
+      ),

hm, that didn't work for me. Some ajax was triggered but nothing gets replaced, so view-modes are not reflected.

dawehner’s picture

Status: Needs work » Needs review
FileSize
4.94 KB

Corrected the first part.

For me the ajax works fine. The possible view modes are replaced on the bottom maybe you switched between two which just have Default.

fago’s picture

Status: Needs review » Fixed

Nop, I verified I tried it with the right ones.
Anyway, in the meanwhile I have updated my views test installation, now it works!? So maybe it's an issue with old Views versions? Shouldn't be a big deal though, thus committed - thanks! :-)

dawehner’s picture

Oh i would have never thought that. This kind of #ajax code existed for the field-field handler since 1,5 years.

Thanks for comitting it!

Status: Fixed » Closed (fixed)

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