Forum

Thread tagged as: Problem

Custom page attributes missing in a skip-template return

I can't seem to get custom page attributes to appear when returning an array from perch_pages_navigation. When I dump the array or use perch:showall there are no custom attributes there, but if I use the template they seem to work. Tried hard-setting 'use-attributes' to true with no success.

I'm running Perch 2.7.8.

Thanks for your help!

Kirk Roberts

Kirk Roberts 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

I can't see a reason it shouldn't. What options are you setting?

    $pages = perch_pages_navigation(array(
        'skip-template'=>true,
        'flat'=>true,
        'hide-extensions'=>true,
        'hide-default-doc'=>true,
        'include-hidden'=>true,
        // 'use-attributes'=>true
        ), true);
    echo '<pre>';
    var_dump($pages);
    echo '</pre>';

Garrr.... looks like this was user error. Had a different version of Perch running on the live site, which is where it wasn't working. Should be all set now. Sorry for the disturbance!

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, great.