I'm trying to grab an Asset which is a child of my Entry...
$criteria = craft()->elements->getCriteria(ElementType::Asset); $criteria->childOf = $entryId; $photo = craft()->assets->findFile($criteria);
For the most part, this works pretty well. But my entry has multiple Asset fields, and sometimes it grabs the wrong image.
I suspect that I just need to add another parameter to my
$criteria, but I can't figure out what... theoretically something to denote which specific field I'm referring to. Any suggestions?