logo

Extra Block Types (EBT) - New Layout Builder experience❗

Extra Block Types (EBT) - styled, customizable block types: Slideshows, Tabs, Cards, Accordions and many others. Built-in settings for background, DOM Box, javascript plugins. Experience the future of layout building today.

Demo EBT modules Download EBT modules

❗Extra Paragraph Types (EPT) - New Paragraphs experience

Extra Paragraph Types (EPT) - analogical paragraph based set of modules.

Demo EPT modules Download EPT modules

Scroll

output of Tambov in the view template

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

Hello!

I need advice again.

We have: a view - a set of fields, including an "icon" which is a separate field in the data structure.

A full-size image is uploaded to the field and a thumbnail is automatically created there.

I'm displaying it as an unformatted list using the template "views-view-unformatted--exhibitions.tpl.php", and the template is being applied.

In the template, I display the selected fields. Everything is great, except for the icon :(

In the loop ...

foreach ($variables['view']->result as $id => $row):

$data = $row->_field_data['nid']['entity'];

I display the image:

print file_create_url($data->field_image['und'][0]['uri']);

In the view settings, for the Field-Icon, the image style is set to thumbnail.

However, the method described above outputs the full-size image. I need the thumbnail there.

What should I do?

I know about field_view_field, but I can't seem to use it... at the very least, I'm unclear on what to specify as $entity_type?

If I write node, then "it" does not create the correct URL for the image.

What should I do?