Make PrevNext Navigation Smarter

travelvice
travelvice's picture

Joined: 2005-07-16
Posts: 112
Posted: Tue, 2008-01-08 07:59

Hi there,

I've got an album with three sub-albums and a photo. On the photo detail page I'm using this block of code:

{* Navigator *}
  {g->callback type="core.LoadPeers" item=$theme.item windowSize=1}
  {g->block type="core.Navigator" navigator=$theme.navigator prefix="« " suffix=" »"
  currentItem=$block.core.LoadPeers.thisPeerIndex totalItems=$block.core.LoadPeers.peerCount}

...but with this, the result is simply displaying as "4 of 4", with no navigation.

Is it possible to make this navigation block smarter by not displaying anything if the photo being displayed is the only one in the series?

Perhaps I can put an if statement in there to keep it from running?

Thanks for your thoughts

//craig