OK, at first I thought this was a bug, but it isn't, really. It's a weird side-effect of something I do in just one of my skins, to wit,
Jupiter (which I'm in the midst of heavily revising). It only crops up if you're doing the following:
- Using a skin that supports multiple index pages on one level.
- Using a skin that keeps folders separate from other objects.
- Using a skin that creates separate slide pages, rather than a lightbox.
Here's the setup: a project with two folders (doesn't matter what's inside them) and 20 images, all at the top level. You tell the skin to limit each index page to, say, 6 objects. The skin programmatically set rows/cols to 6/1 (the actual page layout doesn't rely on this, of course - we just need to have the core keep the counter).
Now, to keep folders separate, the skin does a
<ja:fileiterator dirs>, then does a
<ja:fileiterator nodirs>. Since each iterator invocation resets the counter,
index.html ends up with 2 folders and 6 images,
index2.html has 6 images, etc. A bit odd, but I could live with that.
But this is where it gets more interesting. If you're sitting on
index.html, and you click the
image 6 thumbnail, you get the
image 6 slide page. But if you then go "up," you land on
index2.html. The internal variable,
indexPage, is not in sync with what's really happening. It thinks that
image 6 is the eighth object, so it must be on
index2.html.
I suppose I could keep my own counters, but that's a lot of mucking about for not much.
The skin could, instead, check to see if folders and other objects are ever mixed - if the user wants to have multiple index pages, that kind of structure would not be allowed. Each folder would have to contain only folders, or only ordinary objects (which would be the normal situation, anyway). I'm inclined to do this.
Jupiter, BTW, seems to be the only skin that would ever run into this. The other "multiple index page" skins, like
Minimal, just mingle the folders with the other objects, in whatever sequence they appear in the
Explore view.
And
Lizard does something even stranger. If you set it to 5 cols, 4 rows, you get 5 columns, but there's no limit on rows - you get only one index page, no matter how many objects there are.