I'm not sure I'm tackling this problem from the right angle, but here's my situation:
On a page that displays a single DataObject, I want to be able to link to the next / previous DataObject in a DataObjectSet.
I know one can peek the previous / next item in a DataObjectSet_Iterator, but is there a way to set the Iterator's current position to a specific item?
$current_photo = $this->getPhoto(); // DataObject of the current photo $photos = $this->Photos(); // DataObjectSet $iterator = $photos->getIterator(); // DataObjectSet_Iterator $iterator->peekNext(); // DataObject $iterator->peekPrev(); // DataObject
Thanks much for your help