Forum

Thread tagged as: Problem, Runway

Skip-template and categories in Runway

Hi,

With Perch 2.7.7, I could get the labels of categories by doing so:

$results = perch_content_custom('Episodes', array(
       'skip-template' => true,
       'filter' => 'slug',
       'match' => 'eq',
       'value' => perch_get('s'),
       'count' => 1
));

print_r($results[0]['themes'])

This no longer works after upgrading to Runway. Instead of returning an array with the labels of categories, I'm getting what seems to be id's.

$results = perch_collection('Episodes', array(
       'skip-template' => true,
       'filter' => 'slug',
       'match' => 'eq',
       'value' => perch_get('s'),
       'count' => 1
));

print_r($results[0]['themes'])
Array
(
    [0] => Array
        (          
            [themes] => Array
                (
                    [0] => 31
                    [1] => 34
                )
        )

)

Am I missing something?

Cheers,

Robin Pick

Robin Pick 5 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Which version of Runway are you on?

Perch Runway: 2.7.9.

Cheers,

Drew McLellan

Drew McLellan 2638 points
Perch Support

Confirmed that perch_collection() is returning category IDs rather than paths, but I don't think it ever returned labels.

I'll figure out why it's not behaving the same as perch_content_custom().

Drew McLellan

Drew McLellan 2638 points
Perch Support

Should be fixed to behave like perch_content_custom() in 2.7.10