Strange request, need to get main page not to show sub albums.

prrl88

Joined: 2009-09-07
Posts: 6
Posted: Thu, 2009-10-08 22:29

Hi,

I've been working on a site using gallery2. I started with the classic theme and have stripped it down to get to this stage: http://www.alexanderblueclarke.com

My client wants the main page not to show the two sub albums 'Photographs' and 'Paintings'. That is, they just want the page to be blank apart from the header and the sidebar. Then obviously when you click on an album in the sidebar, the thumbnails appear as normal.

Any ideas how I would go about doing this or if it's possible?

Thanks,

Peter

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 22890
Posted: Fri, 2009-10-09 05:37
{if empty($theme.parents)}
{if $theme.pageType != 'admin'}
stuff on root album only and not a admin page
{/if}
{/if}

is that enough of a hint?
I don't know much about the classic theme, so the above check would wrap around how the items are displayed in album.php

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
prrl88

Joined: 2009-09-07
Posts: 6
Posted: Fri, 2009-10-09 11:01

I wrapped this around the contents in album.tpl and the outcome was that the root album still showed the two subalbums 'Paintings' and 'Photographs' but when you clicked on the subalbums they all appeared empty.

Not sure if that is what you meant I should do. My coding knowledge is quite weak.

Any further advice/hints would be greatly appreciated.

Peter

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 22890
Posted: Fri, 2009-10-09 13:37

{if empty($theme.parents)}
{if $theme.pageType != 'admin'}
stuff on root album only and not a admin page
{else}
{else}
stuff on sub albums
{/if}
{/if}[/code]
or

{if !empty($theme.parents)}
sub-albums only
{/if}

Might be a bit easier.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
prrl88

Joined: 2009-09-07
Posts: 6
Posted: Fri, 2009-10-09 13:53

Genius. The second one worked perfectly, thanks.

I've got one final strange request.

They want it so that the root album link in the album select tree ('filing cabinet:') is in italics. I guess changing the css file, will change all the links as they're all one class. Is there a way I can change the style of just that bit of text? In the album select module templates or something?

Thanks again,

Peter

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 22890
Posted: Sat, 2009-10-10 05:10

modules/albumselect/dtree.css
add the bold:

.dtree {
    font-size: 1.05em;
    white-space: nowrap;
font-style: italic;
}

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
prrl88

Joined: 2009-09-07
Posts: 6
Posted: Sat, 2009-10-10 12:37

That changes all the album tree links to italic. If I wanted to change just the root album link to italic, I'm not sure how'd I would do that?

I thought maybe adding a new class with - font-style: italic !important; - then in AlbumSelect.tpl, wrapping the bit that produces the root album link in this class. No such luck though.

Any others thoughts?

Thanks,

Peter

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 22890
Posted: Sat, 2009-10-10 16:22

I think you would have to edit the JS for the tree. No I don't know how.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
prrl88

Joined: 2009-09-07
Posts: 6
Posted: Thu, 2009-10-15 22:32

Thanks for your help, is there anyone who would know how to do this?

Peter