nk-crew / lazy-blocks

Use Lazy Blocks plugin to rapidly build custom blocks without ever leaving your WordPress editor
https://www.lazyblocks.com/
GNU General Public License v2.0
338 stars 40 forks source link

Repeater in repeater #89

Open JohannesDeml opened 5 years ago

JohannesDeml commented 5 years ago

From what I can tell it is not possible to add a repeater in a repeater. My usecase for that would be a simple description list. A description list can have multiple description terms which again can have multiple description details. The frontend html would look like this:

 <div class="description-container">
   <dl>
    {{#each entry}}
    <dt>{{description_term}}</dt>
    {{#each detail_entry}}
    <dd>{{description_details}}</dd>
    {{/each}}
    {{/each}}
  </dl>
</div>

Is there any reason this is not supported? And how hard would it be to implement? I haven't done any wordpress plugin development so far, but I do know my way around php. :)

nk-o commented 5 years ago

The reason is simple - for now, I don't have a normal, not hacky solution. If someone has any solutions, welcome to https://github.com/nk-o/lazy-blocks/pulls

Currently limited to 1 nesting level

JohannesDeml commented 5 years ago

Hi @nk-o

Thanks for the response and pointing me in the direction I have to look at. Hopefully I will find the time to solve the problem and create a PR.