I created a gallery of images in Wix, and this gallery has several pages.
I need to insert the number of images on each page and the number of remaining images.
I have spoken with the help of Wix and I have been told that this function does not exist.
Could you help me? If you can help me, I would appreciate it if you could explain it to me very clearly, since I do not know anything about programming.
I enclose an image of what I need (it’s in a red circle).
Thank you.
Hey there
What elements and data do you use on your page. Is it rendered from a Data Collection or are you using some Wix App to accomplish this? The pages element has properties where you can set the totalPages and currentPage properties by using code.
Provide more information on what elements you use and I will do my best to help you.
Dear Andreas,
First of all, thank you very much for your interest in helping me.
I have all the galleries each, in a different folder within the Wix application.
I enclose an image capture where you can see how I have everything organized. Within each folder there are images of the same family, and these images are in their corresponding gallery.
Thank you very much for your interest.
Hey
So if all images are attached in a Gallery on your page you can count the number of images in that particular gallery using the below code.
let countImages = $w("#yourGalleryID").items.length;
So just modify the yourGalleryID to the id so see on your page in the properties panel on the right.
Then to set that counter to your paging element on your page use the below code.
$w("#myPagination").totalPages = countImages;
Then you will need to explain what you want more to happen. Thank you.
Hello,
Can you tell me why I have to sign in to write what you tell me?
Sorry but there is nothing programming language.
If you can explain the steps to access and make yourself thank you very much.
For example, I have a gallery called “VASOS FORMAS BAJAS” (I write to you from Spain). Can you tell me how I have to put the code of this folder example?
Thanks for your interest!