Hi,
Firstly, thanks for Zenphoto - I love it
Secondly...
I love having the gallery on the front page. However, I'd like to be able to have a different collection of albums on the front page (index.php) than the main gallery.
My main reason is to have a few portfolio albums on the front page, with all other albums showing up in the main gallery page.
Is this possible in a neat way (e.g. showing a collection of sub albums) or will I need to copy the gallery.php code and hack it around for the index page?
I'm using zpgallerific if that helps!
Many thanks in advance!
Comments
Dumb question time - can I set $_zp_current_album manually?
I'm trying to call printCustomAlbumThumbImage() but it obviously needs the current album setting, and I'm trying to do this manually.
However, I can't get it to work, and I'm not sure why....
A quick demo:
If I used the code
'
<?php next_album(); ?>
<?php echo getBareAlbumTitle();?>
'
Then it returns 'weddings' on the page
But if I set it manually:
'
<?php makeAlbumCurrent(weddings); ?>
<?php echo getBareAlbumTitle();?>
'
It returns with:
'
Fatal error: Call to a member function getTitle() on a non-object in /home/photog/public_html/zp-core/template-functions.php on line 84
'
I'm not sure what I'm doing wrong - I've tried the album title as a bare string, with ' and with " and also the album ID from the database. All have the same results.
Help?!
Within the `next_album` loop the current album is setup anyway for each album listed. If you want to use the `next_album` loop within an album for its subalbums you have to setup its album object before the loop naturally.
Recommended read:
http://www.zenphoto.org/2010/02/zenphotos-object-model-framework/