Skipping album.php

Is there a way to skip the album page?

I want the user to be able to click on the album icon in the gallery page and go directly to the first image of that album. Is this possible?

I looked at the template-functions but I can't figure out how to pull out the `image` and `` values seperately within the `next_album` and `next_image` loops respectively.

Any suggestions?

Thanks!

Comments

  • trisweb Administrator
    It's possible, sure...

    In index.php, you'll have something like...

    `while (next_album()):

    next_image();

    [[ code from album.php to display image thumbnail and link goes here ]]

    while(next_image()) { } // A hack to skip the rest of the images....

    endwhile;`

    You can basically put the functions on whatever page you want, they really don't care. :)

    the `while(next_image()) { }` is unfortunately necessary for now because I haven't planned for the situation where you'd only do a partial loop... I might add some better way in the future, but that should work for now.
  • You did it again, I put this code in my index.php:

    `<?php while (next_album()): ?>`
    `<?php next_image(); ?>`
    `" title="<?=getImageTitle();?>">`
    `<?php printImageThumb(getImageTitle()); ?>`
    `
    ``<?php printAlbumTitle(); ?>`
    `<?php while(next_image()) { } ?>`
    `<?php endwhile; ?>`

    Worked like a charm, you are really ontop of this stuff. I've used Wordpress and Folderblog, and this has been by far the easiest application to use and the best support I've seen.

    Thanks!
  • trisweb Administrator
    Your gallery looks wonderful Roger - I love the thumbnail stuff you've done. I'd love to get a generalized theme based on that idea, hint hint ;-)
  • Hi, I tried this method and got this error:

    Call to a member function getSubalbums() on a non-object in /home/thomas/public_html/jfiege/photography/zp-core/template-functions.php on line 298

    Ideas?
  • I just checked a comment I left about this at another post-
    http://www.zenphoto.org/support/topic.php?id=752&replies=10

    That method worked great. Should have checked that before posting here....:)
Sign In or Register to comment.