Thumbnails in sidebar

Hi,

I'm trying to add the printPagesThumbsNav in the sidebar, the plugin is activated and I've found the code in image.php.

But when I add this short code to sidebar.php, it only works on the album page, generating an error for everything else — Fatal error: Call to a member function getFileName() on a non-object in XX/XX/template-functions.php on line 1866

<?php if (function_exists("printPagedThumbsNav")) {
printPagedThumbsNav(6, FALSE, gettext('« prev thumbs'), gettext('next thumbs »'), 40, 40);
} ?>

Any idea?

Thanks

Comments

  • `printPagedThumbsNav()` prints the nav links for an album. What are you expecting to happen if you use it on a non-album script page?

    You will either have to setup an album context for it to make the nav links for or not use the function except when there is an album context setup. For the latter you can use the test `if ($_zp_gallery_page == 'image.php')` to insure you are in an image page. [note: `$_zp_gallery_page` may need to be declared global if you are referencing it within a function.]
  • manik Member
    Thanks sbillard, it works just fine now!
Sign In or Register to comment.