Unique (custom) Index Page [resolved]

travelvice
travelvice's picture

Joined: 2005-07-16
Posts: 112
Posted: Wed, 2005-09-14 19:20

Hi there,

Here’s what I’m attempting to create:

I’m looking to match the look and feel of the top level of Gallery with the template that I’ve created for my site. Essentially, what I’m going for is to have a listing of the root level albums displayed inline with my site, which when click upon, takes you into a slightly modified Matrix theme.

I’ve been successful at creating a template file and spitting out the top level albums – visually, everything is starting to come into place. Where I’m having problems with is with the functionality/interaction of the homepage/index/main page.

How I’m currently helping the system to determine when to use the unique template is by modifying the theme.tpl and adding a if/else statement to either load my site template, or use the Matrix template. This is currently based on the unique title of the main album:

{if $theme.item.title|default:$theme.item.pathComponent|markup:strip == 'Unique Root Album Title'}

Here’s the problem:
I’m losing the ability to log into Gallery, or use any of the functionality that references that root album (because it’s showing my site template instead of the default theme).

Thoughts on how I should proceed?

Perhaps there's a way to check and see if anything is being pass along the query string (and if so, exclude the use of the unique index page template).

Best,

//craig
Phoenix, AZ

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2005-09-14 23:28

create a new customized theme and just use it for the top gallery.
use another theme as the default theme.

result:
top gallery = front page can be designed as you wish, other albums still look like normal albums.

you may also look at the PG theme (see user contributions page on codex.gallery2.org), it does a special frontpage thing without using 2 themes.

 
travelvice
travelvice's picture

Joined: 2005-07-16
Posts: 112
Posted: Wed, 2005-09-14 23:40

Thanks Valiant -- tossed you a PM.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2005-09-14 23:43

ja, and what should i do with your website?
i guess the principle is clear. i can't help you design your page though, not enough time for such things.

btw: please keep stuff in the forums and only pm me confidential information if absolutely needed, since i try to use my time to support in the forums as efficiently as possible. thanks for your understanding.

 
travelvice
travelvice's picture

Joined: 2005-07-16
Posts: 112
Posted: Wed, 2005-09-14 23:56

My apologies if I offended, I didn’t wish my site (still in dev) to be on the public record.

 
travelvice
travelvice's picture

Joined: 2005-07-16
Posts: 112
Posted: Thu, 2005-09-15 00:50

Modification to if statement seems to have cleared this up:

{if ($smarty.server.QUERY_STRING =='' || $smarty.server.QUERY_STRING == 'g2_view=core.ShowItem') AND ($theme.item.title|default:$theme.item.pathComponent|markup:strip == 'Unique Root Album Title')}