Repeat Vs Repeat Children

A member asked me this question in a PM. I gave him an answer but also suggested it be posted publically as it is something I suspect many are not 100% sure about.
They are a little shy and have asked me to do it for them
The question was:

Can you explain how Repeat and Repeat Children work?

Let’s see if I was correct!

1 Like

Hey Brian,
It’s quite easy to guess which of the two options is doing what:

  • repeat is repeaing the element it’s applied to
  • repeat children is repeating the child element in a parent>child structure, such as ul>li or div>div or whatever parent>child structure is.
1 Like

If you are the parent of the child then you should never repeat children or they will turn out a little strange. :slight_smile:

5 Likes

my reply was as below so not bad I guess.

I believe Repeat only acts on a single element where repeat children will repeat the children in a parent>child structure as many times as records are returned by the query. A good example of a parent>child structures are lists (ul/ol), tables (body>row) or any other HTML structure having children elements inside a parent one:

2 Likes

You are right Brian, your reply is correct :slight_smile:

Hi @Hyperbytes

Can you please show me a screen shot of the repeater in the app structure? I’ve been experimenting with it using this API (https://api.iextrading.com/1.0/stock/aapl/news) since it does not require auth or headers, and cannot get it to repeat anything. I am just trying to learn how it works. I am sure I am not structuring it correctly and think it would be really helpful to see the App Structure and the repeat properties.

Hi @fatherofinvention

Sorry about delay, you posted just after i went to bed
Happy to assist in any way

I assume you are trying to list the results from the API query
You can do this using a repeat region or a bootstrap table (which is a quick and easy way to do it)
Basically, set up your API and fetch the schema
Create your data container and depending on how you want to list either create a repeater row or a repeat within a column for example
Set your repeat stage to the api connection data (shown in screen shot)


Then you can pick the data fields you want within the repeat

Be sure to select from the repeat section, not the original api data source or the element willl not repeat

I would show the result in a browser shot as a nice repeat list but the API data source is only returning 1 article!

Anything else you need, just tag me.

2 Likes

Hi Brian (@Hyperbytes)! I'm very grateful for your expertise. It worked perfectly. By the way, I've watched all of your videos and find them to be excellent. Hopefully your schedule will permit the addition of new content in the future. Thank you!

1 Like

@fatherofinvention Busy with a huge project that is nearly finished then i intend to put time aside to make a lot of new videos to go with the many excellent tutorials already made. In a few weeks i anticipate

1 Like