Forum

Thread tagged as: Problem, Runway

Display Related Content in Collection Items Listing

Hello,

Wondering if I'm missing something here.

I have two collections setup: Classes and Staff. Here is the template code for my Classes collection:

<perch:content id="classsubj" type="text" label="Course Title" required="true" title="true" />
<perch:content id="classslug" type="slug" for="classsubj" editable="false" suppress="true" /> 

<perch:categories id="classacad" label="Category" set="academics" required="true" />

<perch:related id="classstaff" collection="Staff" label="Staff">
    <perch:content id="name" type="text"  />
</perch:related>

Everything is working fine and as expected, but when I return to the listing that displays all the items in my Classes collection, I want to display the selection made for Staff.

Under my Options tab for the Classes collection, I have these to choose from:

name, _title, classacad, classslug, classsubj

I added: _title, classacad, name, so that the listed items should each display a classroom title, the category of the class, and the staff name of that class.

But all I'm getting is the class title and the category displaying. Name is coming up blank.

I'd like for the name to display so that at a quick glance, if two staff members are teaching courses with a similar subject name, the two items can quickly be distinguished and an admin won't have to open each class item to verify who the staff member is for a particular class.

In my Staff collection, the perch content field for name does have the title="true" attribute.

So how can I get the staff name selected from the perch related field in my Classes collection, to be displayed in the items list of my Classes collection?

Thank you, Joshua

Joshua Rodriguez

Joshua Rodriguez 2 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

At the moment you can't display categories or related items in the control panel listing.

Drew,

Thanks. I think categories does display in the control panel listing. Here's a screenshot of my listing, using the perch:categories field in my Class collections template.

Categories displaying

Would it just be unavailable at the moment just for related items? Also, would it be possible, in addition to being able to display related items in a listing, to add a limit or max attribute for related items - like with repeaters? So that say an editor can only add a quantity of items in a related items field:

<perch:related id="classstaff" collection="Staff" label="Staff" max="3">
    <perch:content id="name" type="text"  />
</perch:related>

...so that an editor in this case would only be able to select a maximum of 3 names to display? In my case there should only be one staff member per course, and in case they have an assistant, they would be able to add them as well, but that's all. What do you think?

Drew McLellan

Drew McLellan 2638 points
Perch Support

OK, it looks like I already did categories. Related items is more complex, but it's still on the to-do list so I'm sure we'll get to it.

Drew,

Hi, are we any closer to the capability of related items displaying in a listing like categories does?

My collection of classes is near 60 items for this school year, and for example, 12 of those are Algebra I classes, but no way of knowing from looking at the listing, which staff member is teaching any of the classes listed.

Would it be safe to hope for this feature update to be out soon? Please advise.

Thank you!

Drew McLellan

Drew McLellan 2638 points
Perch Support

At the moment you're the only person asking for this, so it's not high priority. It's something we'd like to do, but there are other features higher on the list.

That's only fair, and I know you guys have plenty on the list as it is.

I will figure something out, maybe just add an additional field to manually add the names.

Thanks for the update. :)