I am trying to make a custom arrangement of thumbnails for my client's homepage, and I am trying to find the best way to go about it. I want to show 3 random thumbnails from 4 albums, each in columns, forming a table of 12 thumbnails on a single page. Clicking a thumb will take you to the detail page for that item. I also want to provide a dynamic search gallery that show 12+ images from a specific query, so I feel like I should keep a separate template for the homepage (I at least need some logic to use different CSS). Is there a way to check which page the user is on and use a different template?
I am customizing the Zenpage theme, as I will have static pages as well as gallery pages.
Here is an image of what I am going for.
I appreciate any suggestions!
Comments
`$imageobj = newImage($album,$imagenames[0]);` gives you the image object of the first random image.
`$imageobj->getThumb();` gives you the thumbnail image link which you can use in an <img src...> tag to display the image in your table.
How do I target each album to include thumbs from more than one album on the same page?
The main part I am still trying to understand is how to include this custom functionality as the default for my gallery index page (3 images each from 4 albums, in columns), but also include a dynamic album with a more standard view (all 12 images from one search). I want the same menu item to remain active for both views. Is this possible?
I suggest to review especially the theming tutorial and the object model tutorial.
`
<?php $gallery = new Gallery(); ?>
<?php $albums = array('earrings','rings','necklaces','bracelets'); ?>
<?php for($n=0; $n<count($albums); $n++){ ?>
<?php echo $albums[$n]; ?>
<?php $album = new Album($gallery, $albums[$n]);$albumNames = $album->getImages(0,0,'random');
for($i=0; $i<3; $i++){
$imgobj = newImage($album, $albumNames[$i]); ?>
getImageLink(); ?>">
getThumb(); ?>" width="160" height="160"
alt="<?php echo $imgobj->getTitle(); ?>" />
<?php } ?>
<?php } ?>
`