Outputting values from page list object

Permalink
Hello,

I am using the page list object to pull through pages. I appear to have them in an array, but can understand how to get them out..

Please can someone shed some light..?

<?php
                    Loader::model('page_list');
               $pl = new PageList();
               $pl->filterByParentID(122);
               $rtable = $pl->get();
               if(is_array($rtable)){
                  echo '<select name="page">';
                   foreach($rtable as $value){
                     echo " <option value='$value['cID']'>$value['cvName']</option>";
                     }
                  }
               ?>

 
moosh replied on at Permalink Reply
moosh
Hi,

Each items in the array is a Page Object, so you can access to his property as that :

$value->getCollectionID();
$value->getCollectionName();
...