ZenphotoCMS Forum
In layman's terms, what does normalizeColumns do? - 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: In layman's terms, what does normalizeColumns do? (/thread-2517.html)



In layman's terms, what does normalizeColumns do? - Witchhunter - 24-03-2008

I see it at the top of themes and I've read the info on the info pages, but what's it actually for/do? If I have 3 columns on the front (album) page what do I do with it? :/

Oops sorry, wrong forum.




In layman's terms, what does normalizeColumns do? - sbillard - 25-03-2008

Well, that's a tough request--it is a complex function.

Bacicly (very simplified view) it figures out how many images and albums will fit on a page. In particular, it figures this out for the "transition" page where there are both album and image thumbnails on the same page.

There is more detail if you want, but I will stop here for now.




In layman's terms, what does normalizeColumns do? - Witchhunter - 25-03-2008

Hmm, which is the transition page? As mentioned in another thread my front page looks like this. Then when you click a view it goes into a grid of 6 across.

So would that make it 3, 3 and then 6, 6?




In layman's terms, what does normalizeColumns do? - sbillard - 25-03-2008

The transition page is the page (if it exists) is the page thatcontains both album thumbnails and image thumbnails.




In layman's terms, what does normalizeColumns do? - sbillard - 25-03-2008

$firstPageImages = normalizeColumns(ALBUMCOLUMNS, IMAGECOLUMNS);

The first parameter is the number of colums for albums, the second is the columns for images. The result of the function is the number of images that goes on the first image page (the Transision page.)

so, I guess from your question the values would be 3,6.