2 standard setting for 1 theme ?

corvi_yallis

Joined: 2006-01-23
Posts: 9
Posted: Mon, 2006-01-30 03:33

I'm trying to modify a theme (siriux or matrix, doesn't matter) so the number of rows and columns are already been specified the first time someone uses the theme. But I want the number of rows and columns to be different between the top gallery and the rest of albums (and sub-albums). I want the top gallery to be: n row x 1 column, and albums to be: p rows x q columns. Is there a way to do this programmatically? Maybe something through theme.inc, like:

if (top gallery){ setStandardSettings(row = 5, column = 1)
else { setStandardSettings(row = 3, column = 3) }

Thanks.

 
ckdake
ckdake's picture

Joined: 2004-02-18
Posts: 2258
Posted: Mon, 2006-01-30 04:26

The trick I have been using has been to set the theme defaults to what I want for subalbums, setting the top album to it and applying recursively, then setting the top album to something else and not telling it to apply recursively.

 
corvi_yallis

Joined: 2006-01-23
Posts: 9
Posted: Tue, 2006-01-31 01:55

I should clarify that I am looking for a programmatic solution. Either using smarty tag or php. Inside .tpl or theme.inc.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2006-02-01 16:26

why does it need to be code? can't you just do "edit album" / Theme tab for the topmost album and set the rows/columns? any album can override the site defaults from site admin / themes.

 
corvi_yallis

Joined: 2006-01-23
Posts: 9
Posted: Thu, 2006-02-02 05:38

So it sounds like it's not possible. I actually just want to know if it's possible to detect whether it's top gallery or not and whether it can be done in template (.tpl) instead of .inc using smarty tags. I've several ideas in mind that might require to override the site defaults from .tpl

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Thu, 2006-02-02 15:47

generally you can override site defaults in a tpl.. but the set of child items have already been loaded when the tpl is processed. so you could decide in the tpl to show 4x4 instead of 3x3, but you'd only have 9 items to show. you haven't given any reason why it won't work to just set different rows/columns values in the theme settings for the root album.

{if !$theme.item.parentId} this is the root album {/if}

 
corvi_yallis

Joined: 2006-01-23
Posts: 9
Posted: Wed, 2006-02-08 03:18

Excellent. Thanks.