Forum

Thread tagged as: Problem, Runway

Related content with skip-template returning id?

Hi,

I'm exploring Runway's related content feature. I'm running Runway 2.7.10.

I have two collections:

  • People
  • Episodes

When I skip-template the episodes collection, the array returns id's for People. I would expect it to return the value entered in the dashboard instead. Is it the expected behaviour?

$results = perch_collection('Episodes', array(
    'skip-template' => true,
));

print_r($results[0]);

Returns:

Array
(
    [people] => Array
        (
            [0] => 13
        )
)

The related content seems to work fine because I can see on the page the value entered in my collection People. Just in case, here is my two templates:

episode_item.html

<perch:related id="people" collection="people" label="People">
       <perch:content id="name" type="text" />
</perch:related>

people_item.html

<perch:content id="name" type="text" label="Name" required="true" />

What's the expected behaviour for related content when skip-template is used for the collection holding the related content?

Cheers,

Robin Pick

Robin Pick 5 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

It's expected behaviour in that yes, that's what it does. It's on my to-do list to improve.

Any update on this? I'm running into the same issue with related fields using perch_content_custom on the latest version of Runway (2.8.6).

Is there a workaround we can use in the interim?