Bypass index page and show 1 album's content by default

Hello again (long time no see)

I'm using Zernphoto again on a portfolio site (wahooo!!!)

Because there's only 1 album at the moment, I'd like to skip the index page and show the album's contents straight away, on the root folder.

I can't figure out how to do this... can anyone help?

Cheers,

James

Comments

  • Is the album page your landing page? Otherwise you could just link to the album page. Otherwise renaming album.php to index.php should work (I believe).

    Best wishes,

    Christian
  • Hey, I tried renaming album.php but one of the function calls wasn't working or something (I'm not a php person)

    Yes, the landing page should be the main album - you'll see what I mean at http://www.athenegreig.com/ - I'd like all the thumbnails to be on this first page if possible....
  • Geert Member
    Linking to the album page is one option. Or redirect your page in the index to that your album (in the header, with javascript or something).

    The easiest way is probably to add something like this code somewhere in the header of your index page:

    <script type="text/javascript">
    window.location.href='/recentwork';
    </script>

    Also, you can create a little code that checks if there is only one album or not with getNumAlbums(). If it returns only one, go to that album and if not, show the index.
  • Some good tips there, cheers Geert :)
Sign In or Register to comment.