Forum

Thread tagged as: Question

perch_content_custom() filter and page?

Hi guys,

I'm trying to pull in pages through perch_content_custom(), but only the ones that match a value specified in a field.

Is that possible?

So far, I have this:

perch_content_custom('Overview', array(
                'page'=>$page['pagePath'],
                'template'=>'work/_item.html',
                'filter'=>'categories',
                'match'=>'contains',
                'value'=>'digital',
            ), true);
Harry Ray

Harry Ray 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Is categories a category field, or just a regular field that you've called "categories"?

Just a regular field, is that causing problems?

Drew McLellan

Drew McLellan 2638 points
Perch Support

No, that's fine - I just needed to check your filter was what you expected.

That should work fine, I think. If not, please post your diagnostics report and the debug output from the page and we'll take a look.