Closed (won't fix)
Project:
Views (for Drupal 7)
Version:
6.x-2.x-dev
Component:
Views Data
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
4 Jan 2010 at 12:09 UTC
Updated:
25 Aug 2017 at 09:58 UTC
Jump to comment: Most recent
Comments
Comment #1
joachim commentedOops.
I mean the style template -- eg, views-view-unformatted.tpl.php
Comment #2
jmcintyre commentedI too would really like to know how to do this. I don't even know if $view->result would get data from fields through relationships in the row's query.
Is there a reference anywhere to the Views-related variables available in views-view.unformatted.tpl.php? The code refers explicitly to $title, $classes, and $rows; and $view is assumed - perhaps there are others?
Comment #3
jmcintyre commentedUpon further investigation... I found that $view->style_plugin->rendered_fields contains all the data, including data from related nodes, for the query.
However, as the OP said, it's not clear how to match these up with the result rows if a grouping field is used for the view.
To clarify, when views-view.unformatted.tpl.php is used to display the first group of results, $id is in sync with the index of $view->style_plugin->rendered_fields:
On subsequent groups, however, $id restarts at 0. Perhaps there's a way to inject the index used to generate each element of $rows into another array variable available to the style template?
Comment #4
dawehnerWhat about having a theme_views_view_group?
This would have a) the title and the "subview" availible, by default just print the "subview" because the title is handled there
Comment #5
Letharion commented@dereine
So is this a feature request then?
Comment #6
dawehnerOh, yes it's definitive a missing feature.
Comment #7
Letharion commentedComment #8
alex.skrypnyksubscribing
Comment #9
mustanggb commented