Forum

Thread tagged as: Question, Problem

Repeaters within Repeaters

Is there a way to have the <perch:repeater> tag within another repeater tag? It's not working correctly in my code. I've provided it below. Thanks!

            <perch:repeater label="Add a Category" id="cat" max="4">
                        <li>
                            <h3><perch:content id="category" type="text" label="Category Title" default="Category Title Here"           reqiure="true" help="Provide a category title, such as Connect or Visit"</h3>
                            <ul>
                                <perch:repeater label="Quick Links" id="links">
                                    <li><perch:content type="text" id="quicklinks" label="Quick Link"</li>
                                </perch:repeater>
                            </ul>
                        </li>
          </perch:repeater>
Greg Stone

Greg Stone 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

You can't nest repeaters, no.

This would be a great option for future releases. It would be a particularly excellent solution for tables, where you may not only want to give the option for additional individual cells, but additional rows as well without having to place multiple repeater regions for each additional row that may or may not be used. That still isn't too bad, and I am a n00b so maybe there is a solution to this that I have yet to figure out. But that's why I'm browsing these forums and the documentation :P

oooh, perhaps blocks would work for this!! Or maybe not, I'm unsure and still learning but about to find out! ^_^