Different Index Page

Joel Theodore

Joined: 2006-09-17
Posts: 40
Posted: Sun, 2006-09-17 10:05

Hey All,

I like the gallery layout of the 3 columns per row. However for my gallery's index page I want it to look different. I only want one image per row.

Can this be achieved ? As looking at the template files if I alter the album.tpl file it alters ALL the albums.

I only want to edit the very very front page of the gallery to be layed out different.

Here's a photoshop mockup of what i'm trying to achieve: http://img170.imageshack.us/img170/5762/extremekitesgalleryeq0.jpg

Any help appreciated in which areas I should be looking to edit.

Regards,

Joel

 
mtbkanata

Joined: 2003-02-10
Posts: 8
Posted: Sun, 2006-09-17 17:28

I did it on my site:

http://www.zoomphoto.ca

Look for this in your theme.tpl file (It might not be exactly the same, but you'll see what I mean:)

Quote:

{* Include the appropriate content type for the page we want to draw. *}
{if $theme.pageType == 'album'}
{g->theme include="album.tpl"}
{elseif $theme.pageType == 'photo'}
{g->theme include="photo.tpl"}
{elseif $theme.pageType == 'admin'}
{g->theme include="admin.tpl"}
{elseif $theme.pageType == 'module'}
{g->theme include="module.tpl"}
{elseif $theme.pageType == 'progressbar'}
{g->theme include="progressbar.tpl"}
{/if}

And Replace with:

Quote:
{* Include the appropriate content type for the page we want to draw. *}
{if $theme.pageType == 'album'}
{if $theme.item.parentId == 0}
{g->theme include="front.tpl"}
{else}
{g->theme include="album.tpl"}
{/if}
{elseif $theme.pageType == 'photo'}
{g->theme include="photo.tpl"}
{elseif $theme.pageType == 'admin'}
{g->theme include="admin.tpl"}
{elseif $theme.pageType == 'module'}
{g->theme include="module.tpl"}
{elseif $theme.pageType == 'progressbar'}
{g->theme include="progressbar.tpl"}
{/if}

 
Joel Theodore

Joined: 2006-09-17
Posts: 40
Posted: Mon, 2006-09-18 11:35

Sweet mate, thankyou very very much.

I looked at your code and the template file, all looks to make sense, easy "if" statement.

Thankyou once again for pointing me in the right direction, I should be able to cruise on it from here.

Regards,

Joel

 
Alex Paes

Joined: 2006-09-21
Posts: 7
Posted: Thu, 2006-09-21 13:40

Hi guys,

I've been just trying out gallery2 and it rocks, however i have run into a little problem, i started creating a new theme based off from the Classic theme. Now the problem i'm having is how to have the initial page (the one that shows up when i access main.php to follow the theme specifications? I tried changing around in theme.tpl but apparently this only affects subsequent pages, not the main one. Any tip will be highly valuable.

Thanks in advance for all the help. Cheers,

P.S - Ok call me dumb but i just got there, apparently it all starts from one main album, i had this 'main' album set to use another theme. Sorry for the useless post anyway. ;)

 
Joel Theodore

Joined: 2006-09-17
Posts: 40
Posted: Fri, 2006-09-22 01:06

It is right there above my post Alex, mtb has posted the solution.

remember to create a copy of album.tpl, and rename it to front.tpl