how to get CustomAlbumThumbImage from album object

Hi

I want to display all the thumbs from the subalbums of a certain album on a zenpage page.
in the codeblock of the zenpage I added;
'<?php
$_zp_current_album = new Album($galleryobject,"foldername");
$subalbums = $_zp_current_album->getAlbums();
foreach ($subalbums as $subalbum) {
$subalbumobj = new Album($_zp_gallery,$subalbum);
echo "<img src=\"".$subalbumobj->getAlbumThumb()."\" >";
} ?>'

this works and correctly shows the Album thumbs of the subalbums..

but how would I proceed to get the custom sized thumbs from am object? like printCustomAlbumThumbImage(getBareAlbumTitle(), 130); in a normal loop does?

thanks..

Comments

  • Have you tried this in your foreach loop?
    `printCustomAlbumThumbImage(($subalbumobj->getAlbumThumb()), 130);`
  • Hi Micheall, just tried it but broke the page....
  • You can't get the custom sized images directly from an object. The function doesn't have the object as a parameter, but instead uses `$_zp_current_album`, so setting the appropriate album to that variable should allow you access to that image using `printCustomAlbumThumbImage()`.
  • You can make use of the zenpage function `zenpageAlbumImage()`
  • `
    <?php zenpageAlbumImage($subalbumobj->getFolder(),null,130) ?>
    `
    did the job, thanks!!!!!
  • acrylian Administrator, Developer
    zenpageAlbumImage()` does only display a sized image without cropping. If you want also cropping actually using
    `
    $albumthumbobj = $subalbumobj->getAlbumThumbImage(); // this returns an image object of the album thumb
    $albumthumbobj->getCustomImage(...);
    `
    is what you are looking for.
Sign In or Register to comment.