Search…

X3 Photo Gallery Support Forums

Search…
 
Eightkiller
Experienced
Topic Author
Posts: 116
Joined: 15 Jul 2012, 14:34

How to Show images amount when they are in subfolders

15 Jun 2015, 05:34

Hy,

I would like to know how i can show images amount when the images are not directly in the child folder but in subfolders, when u use the property items:amount, it only shows a number if the images are directly under. If they are in subfolders it only shows "0", it does not even show the numbers of folders. I know there is the "folder_amount" property but it's only applicable to "context" and "folders", but not in "menu" so i can only show the number of images directly under, and i can't even mix images amount and folders amount. I might have missed the proper property to use, that's why some help would be greatly appreciated ! :)

1/ For example in my menu, u can see the "Paysages" category showing 0 images Image

2/ Despite having 3 subfolders with many images in each:
Image

Thanks in advance.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13999
Joined: 30 Sep 2006, 03:37

Re: How to Show images amount when they are in subfolders

15 Jun 2015, 07:38

Unfortunately, it just doesn't work like this. X3 is folder/page based, and there is no super-function to count images inside all subfolders. First of all, it would simply be wrong if we counted all images inside subfolders and forced it upon the amount of images in the parent folder (which might not contain any images). Furthermore, if we were to add something like this, to the menu, it would require a loop to count all images in each subfolder, and that in an existing loop that loops through all items to create the menu. Also, should it count images inside child-child-folders also at any depth?

We will however be adding "folders_amount" to the menu, but default "amount" will not be set to include all images recursively in subfolders. The "amount" should be reserved for counting the amount of images inside the specific folder. If I click a page item that says "8 images", I would expect that page to show 8 images ... If it shows 3 galleries instead, then what is the point? The sub-galleries themselves can easily show how many images are in each folder.
 
Eightkiller
Experienced
Topic Author
Posts: 116
Joined: 15 Jul 2012, 14:34

Re: How to Show images amount when they are in subfolders

15 Jun 2015, 07:44

I agree with your explanation, but what i would just need is to be able to mix the "amount" and "folder_amount" on the menu, in order to have something coherent, showing the images amount if it contains directly images or the folder amount if it contains subfolders :)

Some more "if" sections to add ^^

Thanks :)
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13999
Joined: 30 Sep 2006, 03:37

Re: How to Show images amount when they are in subfolders

15 Jun 2015, 10:22

Eightkill wrote:I agree with your explanation, but what i would just need is to be able to mix the "amount" and "folder_amount" on the menu, in order to have something coherent, showing the images amount if it contains directly images or the folder amount if it contains subfolders :)
You mean in the same menu item, you might have both some pages with folders inside and some with images? Yes I guess we could improve the menu a bit, although it will have to wait a bit.
 
Eightkiller
Experienced
Topic Author
Posts: 116
Joined: 15 Jul 2012, 14:34

Re: How to Show images amount when they are in subfolders

15 Jun 2015, 11:08

Yes that's what i mean :), for some items you would have "the amount of images" and for some others "the amount of folders"
We are not in a hurry as long as u have written it somewhere :p

Good luck !