I guess you meant to say: "when the visitor clicks on the container 2 of the repeater 1, the repeater 3 is displayed and the 2 is hidden. "
Anyway I’m not sure if you meant that clicking the any container in repeater1 will display repeater 2, or just clicking the first item in repeater1 (index=0) will display repeater 2.
please clarify.
There will be on the page a parent repeater and 6 other children repeaters(hidden at loading). The goal is that when a visitor clicks on a container (Item1, Item2 …) it hides the parent repeater and displays the child repeater.
@weneedcontis Je vous dirai qu’en avoir six fera une grande difference en chargeant la page. Ca serait mieux de faire vos connexions avec WixCode pour que ca peut charger assez vite.
En fait, vous avez juste besoin de deux repeaters, l’un a gauche connecte en utilisant le GUI et l’autre connecte avec code dynamique. Ca dependrait du numero de databases que vous voulez connecter.
I searched all day, very complicated to find the info, I regret not having studied computer science at school.
Please, can you give me at least the beginning of the code?
So now I have
On one page 2 repeaters.
The first is displayed on loading and the second hidden.
The first repeater is not connected to a database, it has 2 fields: a title, an image.
The second repeater is connected to a database that contains 3 fields: a title, an image, a category.
I am looking for the method to:
-a visitor clicks on image1 of repeater1, then data of the “delivery” category are displayed in repeater 2.
-a visitor clicks on image 2 of repeater 1, then the data corresponding to the “transport” category are displayed in repeater 2
@weneedcontis It should work as long as a couple other things are true:
You have to go to your repeater 1’s properties panel and check onItemReady.
You have to make sure it says onItemReady in the properties panel text, and not onItemReady_1.
You need to make sure if the title isn’t exactly the same letter for letter in your title text as it is in your categorie field, that you play with the code a bit. Check out the wixFilter API.
Last, you may have to refresh the dataset1 after the filter is set.
@weneedcontis Dataset1 should only be connected to your 2nd repeater, nothing else. Permissions should be read only. If they are both all lowercase it will work, otherwise you can add some sort of collapsed text to your 1st repeater with the exact same styling and use it as reference instead. If your collection field has more than one category per item, you need .contains instead of .eq. Try this:
It doesn’t work.
Yes the collection field has more than one category per item.
In the code we filter the dataset1 data but it is not mentioned repeater2, normal?
Now in my editor, there is only one category that appears in the repeater2
We agree that I do not have to replace ‘#title’ in the code by the title of each category ?