Inside views-view-list.tpl.php
there is a loop like this:
<?php foreach ($rows as $id => $row): ?>
<li class="<?php print $classes_array[$id]; ?>"><?php print $row; ?></li>
<?php endforeach; ?>
I want to be able to access the actual values of the fields inside each item, rather than passing off the rendering of the html to views-view-fields.tpl.php
.
In pseudocode, I would like to do this (THIS CODE DOES NOT WORK):
<?php foreach ($rows as $id => $row): ?>
<?php print $row->$fields['field_my_field_name']; ?>
<?php endforeach; ?>
<?php foreach ($rows as $id => $row): ?>
<?php print $row->$fields['field_my_second_field_name']; ?>
<?php endforeach; ?>
Would I actually use the $row
object, or would I use something else?