finding parent/full path name
jerryh
Joined: 2013-02-04
Posts: 27 |
![]() |
I am trying to find the parent path name (like you see in the UI programmitcally) in the album I am uploading into. I've been looking through the code with very little luck. I've done some searching, but the results have not led me to what I am looking for. I have tried fetchPath() but that is returning to me the path of item I am loading ($archiveItem). When I try to get ParentId of archiveItem, it appears to be moving up the archiveItem chain. $archiveItem->fetchPath(); // returns the item that I inserting to albums (path) |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
list($ret, $parent) = GalleryCoreApi::loadEntitiesById($archiveItem->getParentId(), 'GalleryItem'); if ($ret) { die("Error loading parent:".$ret->getAsHtml()); } list($ret, $path) = $parent->fetchPath(); if ($ret) { die("Error fetching path for parent:".$ret->getAsHtml()); } die($path);
-s |
|