Forum

Thread tagged as: Question, Runway

Repeaters inside a Relationship?

I have two Collections. One called "Markets" and the other called "Applications".

Inside the Applications Collection I have a repeater.

I want to loop through the Applications Collection on a Market page rendering the contents of the Applications's repeater too. It doesn't seem to be rendering currently and shows the Application repeater in the Markets Collection.

Effectively it looks like this:

<repeater>
    <relationship>
        <repeater>
        </repeater>
    </relationship>
</repeater>

CODE

<perch:repeater id="market_app_group" label="Application Group" divider-before="Market Applications">
    <div class="card">
        <div class="card__entry">

             <perch:related id="application" collection="Applications" label="Add Applications" help="Add Applications you want to include">
                  <h3>
                       <a href="<perch:content type="text" id="slug" />">
                           <perch:content type="text" id="title" /></h3>
                       </a>
                  </h3>

                  <div class="row">

                      <perch:repeater id="application">

                              <div class="large-6 small-12 columns">
                                     <div class="card__feature">
                                        <img src="<perch:content type="image" id="app_image_thumb_100" crop="true" width="100" height="100" />" alt="<perch:content type="text" id="title" />" width="80" height="80" />
                                         <h5><perch:content type="text" id="app_title" /></h5>
                                         <p><perch:content type="textarea" id="app_desc_aerospace_card" /></p>
                                      </div>
                              </div>

                         </perch:repeater>
                    </div>
             </perch:related>

      </div>
   </div>
</perch:repeater>
Dan Lee

Dan Lee 1 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

If it doesn't display correctly then it's not something that is supported I'm afraid.

Dan Lee

Dan Lee 1 points

So you can have a relationship but you can't spit out the repeater in that relationship. Oh well - back to the drawing board. Thanks Drew.