logo

Palette - Make it Colorful🎨

Palette - Visual Page Builder, no design degree required.

Live Demo Download Palette

Scroll

Template views-view-unformatted.tpl.php

22/02/2025, by Anonymous (not verified)
Forums

Good evening.

 

I have a question: I need to first display all images (field_gallery_country) from all nodes, then all descriptions (field_2), and so on.

 

 

The template views-view-unformatted.tpl.php contains

 

<?php
/**
 * @file
 * Default simple view template to display a list of rows.
 *
 * @ingroup views_templates
 */

?>
<?php if (!empty($title)): ?>
  <h3><?php print $title; ?></h3>
<?php endif; ?>
<?php foreach ($rows as $id => $row): ?>
  <div<?php if ($classes_array[$id]) { print ' class="' . $classes_array[$id] .'"';  } ?>>
    <?php  print $row; ?>
  </div>
<?php endforeach; ?>

 

 

Unfortunately, it throws an error when trying to output instead of <?php  print $row; ?> the following

 

print $row->_field_data['nid']['entity']->field_gallery_country[und][0]['filename'];

 

What am I missing? Please let me know :)