Forum

Thread tagged as: Question

Perch custom sort order

Hi,

I understand content is by default ordered by that of which it is entered, but should reordering within the admin interface alter this? I wish to order my content displayed within perch_content_custom by a specific sequence.

cheers in advance

Steve Forbes

Steve Forbes 0 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, reordering within the interface changes the order in which items are output unless you specify an order on the page.

Re ordering dosn't have any effect on my output. on page i display by the following:

any help be great

                        <?php

                        perch_content_custom('item', array(
                             'page'=>array('/digital/*', '/print/*', '/marketing/*', '/branding/*', '/*'),
                             'template'=>'item--level_min.html',

                             'filter' => array(

                             array (
                             'filter' => 'item--cat',
                             'match' => 'eq',
                             'value' => perch_get('s'),
                             ),

                             array (
                             'filter' => 'slug',
                             'match' => 'neq',
                             'value' => 'business-cards',
                             ),

                             ),


                        ));

                        ?>

Drew McLellan

Drew McLellan 2638 points
Perch Support

Does 'sort' => '_order' have any impact?

Does it make a difference if you're only listing from a single region?