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.
Posts: 2258
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.
Posts: 9
I should clarify that I am looking for a programmatic solution. Either using smarty tag or php. Inside .tpl or theme.inc.
Posts: 8601
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.
Posts: 9
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
Posts: 8601
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}
Posts: 9
Excellent. Thanks.