ZenphotoCMS Forum
Custom Homepage Gallery - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: Themes (https://forum.zenphoto.org/forum-5.html)
+--- Thread: Custom Homepage Gallery (/thread-7320.html)



Custom Homepage Gallery - marcy_sss - 08-07-2010

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!




Custom Homepage Gallery - sbillard - 09-07-2010

$imagenames = $album->getImages(0,0,'random'); will give you an array of image names from the album in random order. You will of course need to be sure that there are at least three of them.

$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 tag to display the image in your table.




Custom Homepage Gallery - marcy_sss - 09-07-2010

Thank you so much, this is a HUGE help!

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?




Custom Homepage Gallery - acrylian - 09-07-2010

It is possible to assign themes to top level albums. Besides that you can do everything on the theme pages directly by coding.

I suggest to review especially the theming tutorial and the object model tutorial.




Custom Homepage Gallery - marcy_sss - 09-07-2010

Your object model tutorial is AWESOME. Thanks for the tips!




Custom Homepage Gallery - marcy_sss - 09-07-2010

Here is the code for a custom thumb table in case anyone is curious :)

`

[img][/img]getTitle(); ?>" />

`




Custom Homepage Gallery - Mortgage Quotes - 13-07-2010

thanks for the code, I'll try this myself.