Currently row plugins have pre_render, why not post_render. Let's add one, maybe people can use it.

Comments

merlinofchaos’s picture

I would wait until there's an actual use case; pre_render exists because there is a need to pre-fetch data before all rows are rendered. I don't have any use cases for a similar post_render.

dawehner’s picture

Here is a case for a post_render not on row plugin but on field handlers.
Views_field_view (vfv) uses tokens to bring arguments from the parent view to the "child" view.
Currently vfv only supports raw-value tokens, because it uses pre_render() when producing an aggregated view to handle all rows on a single view.

The problem is that raw-value tokens doesn't really help on things like fieldapi because you need actual rendered fields, but hey we used pre_render, you are lost.

My idea to solve this is to introduce a post_render method which str_replaces some output tokens like this "views-field-view-output-token-row-1". At this time the fields are rendered so vfv can use the information. Things like empty result don't work with that, but maybe this could be improved later.

MustangGB’s picture

Category: Task » Feature request
Issue summary: View changes
Status: Active » Closed (won't fix)