How do I deal with the most recent album on it's own?

I'm currently creating my own theme, however I've come across a bit of a problem. I want the most recent album to be styled very differently to other albums on the index page. I haven't been able to work out a way to do this though. Here's an image to show what the layout is generally going to look like.

Help would be much appreciated.

Comments

  • Do you want the thumbnail stiled differently or do you want the album to have a different style when it is displayed?

    If the former, are you displaying album thumbs in "most recent" order? If so then the most recent album will be the first in the list. Then you need only put in a counter in the next album loop and put out a different DIV id when the count == 1.

    If the latter, there is a new feature comming that will allow you to assign different themes (or theme options) to individual albums.
  • The html should actually be the same for each of the listed album thumbnails, so the former. I'm trying to get a full size image instead of a thumbnail and a different style of album title for the first (most recent album).

    Yes the albums are in most recent order, but I don't think I know enough to customize it myself, sorry. Could you explain how I would put in a counter for this...

    `<?php while (next_album()): ?>

    " title="View album: <?php echo getAlbumTitle();?>"><?php printAlbumTitle(); ?>

    " title="View album: <?php echo getAlbumTitle();?>"><?php printCustomAlbumThumbImage(getAlbumTitle(), null, 300, 200, 300, 200, 0, 0); ?>

    <?php endwhile; ?>`

    Actually that's just lazy, let me take a look and if I really can't do it I'll come back :)

    [edit] hah and I just figured it out, I'm not such a n00b after all!

    Thanks for the help :)
  • fwiw for anyone else;

    `<?php if (getAlbumID() == 1) echo 'id="albumThumb"'; else echo 'class="albumThumb"'; ?>`

    id="album" is given to the first album, class="albumThumb" is then given to each subsequent album. You can adapt this code to do much more than that though.
  • `getAlbumID() == 1)` will give you the first (earliest) album, not the latest.
    `
    while (nextAlbum()) {

    $n++;

    if ($n==1) {

    ....do latest album stuff

    } else {

    ....do normal album stuff

    }

    ....

    } //end of album loop`
  • Good point, thanks.
  • Sorry I can't get that to work, it just gives me an error message that function nextAlbum doesn't exist.
  • I can't get this working, it just keeps giving me this error:

    Fatal error: Call to undefined function nextalbum() in E:\xampp\htdocs\_sites\zenphoto\themes\test\index.php on line 65

    Line 65 is `$n++;` but I assume it means `while (nextAlbum()) {`. Can anyone help out?
  • Still can't figure out how to get this working, can't anyone help solve this? :(
  • Never mind, got it :s

    sleep is a good thing.
Sign In or Register to comment.