When you're in init.bsh, there is no "current directory," so it can't possibly know how many images there are. That number will be different for index.html, folder/index.html, folder2/index.html, folder/subfolder/index.html, and so on.

The only place where I can find a reference to totalImages
Is the template file:
totalImages Total number of objects, excluding folders, in a directory
And here is not said that you can use it only in index.htt!

The only place where I can find a reference to totalImages
Is the template file:
totalImages Total number of objects, excluding folders, in a directory
And here is not said that you can use it only in index.htt!

It is self evident. But what are you expecting

nrofrows= totalImages/cols

to produce if you have a folder with eight folders, no images and columns set to four?

AndreWolff wrote:
totalImages Total number of objects, excluding folders, in a directory
And here is not said that you can use it only in index.htt!

And what directory do you expect it to be telling you about when you're processing init.bsh? The top level? Each of the folders? Each of the subfolders? At that point, it hasn't even started to traverse the project tree.

Like I said, when you're in init.bsh, there is no "current directory."

jGromit wrote:
And what directory do you expect it to be telling you about when you're processing init.bsh? The top level? Each of the folders? Each of the subfolders? At that point, it hasn't even started to traverse the project tree.

Like I said, when you're in init.bsh, there is no "current directory."

I need this information only in the embedd.htt file, but I understand I have to set the statement
engine.setAlbumWidth(indexPageWidth);
in the init.bsh file.

Well, then, you have an interesting problem. What if there are only 2 rows in index.html, 6 rows in folder/index.html, and 20 rows in folder2/index.html? What value do you want to use for the embedding code?

Hint: you probably want to define mostRows in init.bsh, then as you process each folder, do something like mostRows = Math.max(mostRows, thisfolderRows), and then set engine.setAlbumHeight(mostRows &ast; rowHeight) in finally.bsh, when all the processing is done.

jGromit wrote:
Well, then, you have an interesting problem. What if there are only 2 rows in index.html, 6 rows in folder/index.html, and 20 rows in folder2/index.html? What value do you want to use for the embedding code?

Hint: you probably want to define mostRows in init.bsh, then as you process each folder, do something like mostRows = Math.max(mostRows, thisfolderRows), and then set engine.setAlbumHeight(mostRows &ast; rowHeight) in finally.bsh, when all the processing is done.

Seems like short pages will sit in an iFrame with lots of vertical white space