Struggling to find the answer to this. I have an entity called "school objects" which has a bundle called "homepage". One of the fields attached to this is called "Hero banners" and it allows multiple text values.
All I want to do is print each value. I don't need to check for conditions, I don't need NIDs, I just want each value. I am not really a php developer but understand the basics of what it is doing. I was looking into the EntityFieldQuery
code, but cannot get anything to print on a tpl file I am using.
The output I need, based on image attached, is simply:
<div class="value_1">images/symbol.png</div>
<div class="value_2">Let's make a difference</div>
<div class="value_3">Start today</div>
All I can find after a lot of searching is complex bits of code checking for conditions and stuff that I do not need. I need some kind of array I think so that my template looks like:
<div class="value_1">Value[0]</div>
<div class="value_2">Value[1]</div>
<div class="value_3">Value[2]</div>
All I got so far is this:
query = new EntityFieldQuery();
$query->entityCondition('entity_type', 'school_objects')
->entityCondition('bundle', 'homepage')
->range(0, 14);
$result = $query->execute();
I have read the link to this on the Drupal site but cannot understand it or how to print what I need.