Forum

Thread tagged as: Question, Configuration, Runway

Perch related collection inside a block not showing content in dropdown

I followed an article here https://grabaperch.com/blog/archive/rapid-content-relationships-in-perch-runway which enabled me to get an option in my blocks to select a testimonial for output on a page. It works fine, apart from within the CMS where the select that should show the client name for selection, is just blank. I can select blank options that just appear as grey lines and it outputs on the site, but I've no idea how I can debug this?

Screenshot

Template

<perch:block type="testimonial" label="Testimonial">
            <perch:related id="clientTestimonial" collection="testimonials" label="Select testimonial">
              <perch:template path="content/testimonial_in_block.html" />
            </perch:related>
    </perch:block>
Mathew Doidge

Mathew Doidge 2 points

  • 3 years ago
Duncan Revell

Duncan Revell 78 points
Registered Developer

Do you have title="true" set on one of the fields in the testimonials collection?

Hi Duncan,

No, I don't have that set anywhere. It seems very odd, this is the testimonial template itself:

<perch:content id="client_text" type="textarea" markdown="true" editor="markitup" label="Client testimonial" size="m autowidth" />
<perch:content id="client_img" type="image" label="Client image" width="1020" height="680" crop="true" />
<perch:content id="client_name" type="text" label="Client name" />
Drew McLellan

Drew McLellan 2638 points
Perch Support

You need a title if you want to use it in a relationship.

Hi Drew,

Ah ok, I didn't see that mentioned anywhere, must of missed it. That works, although I am having to go through each entry in the collection and hit save... is there a way to avoid having to do this?

Drew McLellan

Drew McLellan 2638 points
Perch Support

In the future, yes, by making sure you've set up a title for each template.

For now, I'm not sure there is.