Forum

Thread tagged as: Question, Runway

Can related collections be used within repeater blocks?

Can related collections be used within repeater blocks?

I have done the following but it wont out put any options in the admin area for the collection.

<perch:repeater id="files" label="Upload Files">
<perch:before>
</perch:before>
            <li class="download">

            <perch:if exists="heading">
                <a href="<perch:content id="file" type="file" label="File" order="2" />">
                    <span class="cat__icon"><i class="ss-icon"></i></span>
                    <perch:content id="fileName" type="text" label="File Name" order="3" />
                    <span class="download-date"><perch:content id="updateDateTime" type="date" time="true" label="Last Updated" format="%d %b %Y" required="true" /></span>
                </a>
            </perch:if>


                <perch:related id="forms" collection="Forms" label="Related Forms" help="Find Forms you want to list against this article">
                    <perch:before>

                    <a href="/forms/<perch:content id="formSlug" type="slug" />">
                        <span class="cat__icon"><i class="ss-icon">➡</i></span> 
                        <perch:content type="text" id="formTitle" />
                    </a>

                    </perch:after>
                </perch:related>



            </li>
<perch:after>
</perch:after>
</perch:repeater>
Dan Lee

Dan Lee 1 points

  • 3 years ago
Drew McLellan

Drew McLellan 2636 points
Perch Support

You've got some innovative stuff in that template (e.g. pairing an opening <perch:before> with a closing </perch:after>) but it looks like this isn't working.

I think I've fixed it in dev, so it should be there for the next dot release.

Dan Lee

Dan Lee 1 points

Nice one! Great that our feedback gets added in.

Drew McLellan

Drew McLellan 2636 points
Perch Support

You should be seeing this in yesterday's release.