I'm trying to bring back a list of entries from a section. Currently I have the following:
$criteria = craft()->elements->getCriteria(ElementType::Entry);
$criteria->section = 'airports';
$criteria->airportcode = 'BCN';
$airportPrefHotels = craft()->elements->findElements($criteria);
The airport section has a multiple entries field. I want to loop over them.
Is it possible?
airportcode
? Also, you tagged this withcraft3
, but I assume you're referring to Craft 2 here, correct?airports
, you've got an [entries field] for relating other entries. What's the name of that field? And do you want to loop over all of those related entries for every parent entry?