best way to get a list of items in an album when embedded

aldoogy

Joined: 2007-07-16
Posts: 7
Posted: Tue, 2007-07-17 09:32

I have been lookng at the GalleryEmbed class and I cannot see an obvious way to get a list of items in a given album or a list of albums for that matter - so that, for instance, you could layout a bunch of image blocks from an album.
Or am I barking up the wrong tree ?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2007-07-17 09:40

the usual approach for most GalleryEmbed matters would be to let G2 render (generate HTML). so instead of getting a list of items as a PHP array, you'd get themed / rendered HTML output showing a list of thumbnails etc.
and that always works with GalleryEmbed::handleRequest();

if you want data, use the core API. init G2 with GalleryEmbed::init (full init), then use GalleryCoreApi::fetch.... to get the data you want.
see development -> API for details.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage