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

Programmatic rendering of a node image

29/07/2025, by Ivan
Forums

Good day.

There is a separate template for a group of nodes. Each node contains several images. It is necessary to programmatically output the images using a single template.

Example:

<li><img src="../_shared/img/img6.jpg" width="600" height="400" alt=""></li>

<li><img src="../_shared/img/img5.jpg" width="600" height="400" alt=""></li>

So if I do it like this, I will need to create a separate template for each node, which is not very convenient.

I tried to output it like this:

<img src="<?php print render($node->$field_image['und'][0]['uri']);?>"  width="600" height="400" alt="">.

But it doesn't work this way.

It turns out that it needs to automatically read and output the URL of each node image.