How can I find a list of fields output by a view block? FINAL UPDATE

Success! Apparently there were field-level permissions set on several of the CCK fields I needed, in spite of the original developer telling me that content permissions were not enabled. Once I allowed anonymous viewing of the required fields, they displayed with no problem.



I've created a view with a block display. The view has a grouping field, and in the views ui preview, the output displays as grouped by that field:



When I display the block using my template, though, it's not printing out the grouping info (Advanced Learning Session or General Session). That field is not a standard one, like title - it's a CCK text field on my content type. How do I access that field in my template? I've tried the solutions shown here to get a list of available fields, but none of them work.

Edited after trying @schnippy's answer

When I mouse over the field, I see this:



So I tried adding

&lt;?php print "session type: ".$fields['field_session_type_value']-&gt;content; ?&gt;


to my template, but although the "session type:" string prints, there's no value coming through after it. I've also tried writing just the value to the error log, in case there was something weird about combining it with a text string, but still nothing. 

Edit again...

Just to provide a bit more info, if it will help - I'm using the mobile jquery theme, which has a views-view-list.tpl.php file to display views where the output is HTML List. That template looks like this:

&lt;?php
// $Id: views-view-list.tpl.php,v 1.3 2008/09/30 19:47:11 merlinofchaos Exp $
/**
 * @file views-view-list.tpl.php
 * Default simple view template to display a list of rows.
 *
 * - $title : The title of this group of rows.  May be empty.
 * - $options['type'] will either be ul or ol.
 * @ingroup views_templates
 */

?&gt;

&lt;div data-role="collapsible"&gt;
   &lt;h3&gt;&lt;?php print $title; ?&gt;&lt;/h3&gt;
  &lt;&lt;?php print $options['type']; ?&gt; data-role="listview"&gt;

    &lt;?php foreach ($rows as $id =&gt; $row): ?&gt;

      &lt;li class="&lt;?php print $classes[$id]; ?&gt;"&gt;&lt;?php print $row; ?&gt;&lt;/li&gt;
    &lt;?php endforeach; ?&gt;
  &lt;/&lt;?php print $options['type']; ?&gt;&gt;
&lt;/div&gt;


I have a number of views that are being displayed via blocks with this template, and for the most part it's fine because they all are grouped by a title field. But for one view, the records are grouped by a CCK field called field_session_type_value, and if the value of that field matches a specific value, I want to print that field instead of $title.

Another update

According to views-view.tpl.php, $rows is the variable that views sends out as the results of the view query. Now, if I have multiple fields, I would expect that doing a print_r on $rows would return a multi-dimensional array - each record or row would be an array containing a key/value pair for each field. Like so:

Array (
  [0] =&gt; array('title'=&gt; 'Advanced Consumer and Shopper Insight - An Interactive Symposium',
               'session' =&gt; 'general-session'),
  [1] =&gt; array('title' =&gt; 'Creating a Powerful Brand One Dirty Job at a Time',
               'session' =&gt; 'advanced-learning')
)


(Yes, I realize my pseudocode array is not formatted correctly. But you get the idea.) But that's not what I'm getting. What it's sending back is a single-dimension array, containing just the titles:

Array (
  [0] =&gt; Advanced Consumer and Shopper Insight - An Interactive Symposium
  [1] =&gt; Creating a Powerful Brand One Dirty Job at a Time
)


What do I need to do to make sure it sends all the fields through in the $rows array?
You're using the 'row style' type 'fields' here, correct? The field you are grouping on should also be added as a field in your 'fields' list in order for this to be showing correctly in your preview so all you need to do is find the name, which can be tricky to guess depending on the cck field type. One way you can do this is by hovering over the 'link' in the fields editor within views:



and get the name of the field from the url in your browser status bar, ex. 

../view_name/display/field/&lt;your field name&gt;


and then you just print out the rendered view content of your field in your tpl with:

&lt;?php print $fields['&lt;your_field_name&gt;']-&gt;content; ?&gt;