Member
Member
marcy_sss   08-07-2010, 23:42
#1

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!

Member
Member
sbillard   09-07-2010, 01:25
#2

$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.

Member
Member
marcy_sss   09-07-2010, 17:24
#3

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?

Administrator
Administrator
acrylian   09-07-2010, 17:54
#4

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.

Member
Member
marcy_sss   09-07-2010, 18:15
#5

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

Member
Member
marcy_sss   09-07-2010, 18:58
#6

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

`

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

`

Junior Member
Junior Member
Mortgage Quotes   13-07-2010, 23:18
#7

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

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.