Closed (won't fix)
Project:
Views (for Drupal 7)
Version:
7.x-3.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
17 Mar 2011 at 16:35 UTC
Updated:
28 Mar 2014 at 14:24 UTC
Jump to comment: Most recent
Comments
Comment #1
dawehnerViews doesn't support it at the moment.
I doubt you will be able to implement this without breaking views and many plugins.
Comment #2
keithm commentedThanks for your quick response. I appreciate it.
Comment #3
chx commentedI suspect the category revert was not intentional.
Comment #4
merlinofchaos commentedDo you want something along the lines of this:
If so, that's really more like a render element that could be defined in hook_element info that would then render into a view, yes?
Comment #5
keithm commentedmerlinofchaos: The context is a D7 port of the viewfield module, which exposes a view as an entity field.
Your suggestion would work but the emitted render array strikes me as too high-level since there's very little that could be done to modify it, which to me is the primary reason to expose data as renderable in the first place.
In my original request, I was hoping to get Views to produce something like (assuming a list display):
Comment #6
dawehnerYou could write a style plugin which gives you something like this but it will be really hard to implement this as part of views itself.
Comment #7
merlinofchaos commentedYeah, what you want in #5 is going to be very very difficult, because it would require a pretty low level redesign of how views are built. And I'm not sure I want to rebuild Views that way, because I'm not quite sold on what we've done with render arrays in general. There are parts of it I like, but parts of it are maddening.
Comment #8
plach@merlinofchaos:
Would having at least the main building blocks of the
views-view.tpl.phptemplate as keys of a render array be a good compromise? This would allow to move attachments and the view content around the page, for instance. I guess this would cover at least the major use cases.Comment #9
onequad commentedI am also looking for a way to move attachment's output to another part of a page in hook_page_alter(). Any suggestion would be appreciated. ^^
Comment #10
strae commentedHi guys, i need to get the view's renderable array becose I need to insert it into an array that get rendered throught drupal_render.. there is a way?
Comment #11
jmlavarenne commentedThe way have done this is to add the rendered view to a #markup element in a render array.