Get all images in folder by pointer

Hi,

I’m looking into getting all images in x Media Folder to build an Gallery.

I cannot find any pointer that only points to folder so my chain of thought here is.
Point to image and get FolderSystemId it resides in and then get all files using DataService.CreateQuery with that id.

Though i cannot figure out how to get PointerItem to File to get FolderSystemId.
Another thought was to create Folder with a pointer to page. Then get the Folder and then get all the files that are in the folder.

Am I on the right path or is there maybe some other/better way to achieve this?

Thanks in advance.
Best Regards
Artur O.

Litium version: 7.2.3

PointerItem has EntitySystemId which is the File’s systemId. You can you FileService.Get(systemId) to get the File object.

Forgot about this one. For future reference this is correct answer.

Though i went the other way, pointing a folder to a page using a folder attribute. (Think it will be a bit more clear dealing with in BO) but that’s just my preference.

And if you guys take request, PointerItem to Folder support =)

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.