Thumbnails in image.php

I am trying to place the code for thumbnails from album.php into image.php but I am coming across some restrictions.

It seems as if I can't place the thumbnails before the image because there is a conflict grabbing the 'current_image' value.

I get this error:

Fatal error: Call to a member function on a non-object in /home/www/jesseo/public_html/portfolio/zen/template-functions.php on line 577.

Is there a work around this? I'm trying to get the thumbnails to line-up vertically on the left-hand side using only css, and I don't know a way to do it without putting the thumbnails before the image.

Thanks!

-Rog

Comments

  • trisweb Administrator
    So what you're trying to do is put all the thumbnails from the album into the image page, along with the current image...

    What I would do is save the $_zp_current_image in some backup variable, like $_zp_current_image_backup and then restore it after you've gone through the album loop.

    In fact I do believe that's what I'll do to the album loop from now on, to make it restore the original current_image after it alters it...
  • Worked just fine!
    I placed:

    `<?php $_current_image = $_zp_current_image; ?>`

    before the thumbnail loop:

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

    and put:

    `<?php $_zp_current_image = $_current_image; ?>`

    after the loop:

    `<?php endwhile; ?>`

    and it worked just fine.
    Thanks again!
  • trisweb Administrator
    Just FYI - This has been fixed in version 0.9 -- All the loops now restore the previous state of the environment after they run, so you should be able to do anything anywhere :)
Sign In or Register to comment.