Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    • CommentAuthoryixiazi
     
    I would like to know how to restrict the returned columns in my listing page that is generated by the scaffold.

    Here is my line to list my columns:

    $content_columns = array_keys($Product->getContentColumns());

    I just tried the following which did not work:

    $content_columns = array_keys($Product->getContentColumns('ItemMaster','ItemDescription'));

    I could not find the function getContentColumns() to study its object properties and methods, nor could I find it documented on the Akelos site. Any pointers how to use it properly?

    ^__^

    -Brian
    • CommentAuthorKaste
     

    hopefully you find this discussion useful.

    • CommentAuthorKaste
     

    ->getContentColumns() is defined in AkActiveRecord.php which is the more prominent base-class of your models BTW

    • CommentAuthoryixiazi
     
    I discovered the following:

    <?php // $content_columns = array_keys($Product->getContentColumns());
    // I commented out the above line.
    ?>
    <?php $content_columns = array('itemMasterID','itemDescription');
    // I replaced it with a specific reference
    ?>


    {loop content_columns}
    <th scope="col"> <?php echo $pagination_helper->sortable_link($content_column) ?> </th>
    {end}

    Now only the columns that I want to show in the product listing page show up.

    Awesome.
    • CommentAuthorKaste
     

    :-)

    • CommentAuthoryixiazi
     
    Thank you Kaste for the link. That is definitely helpful. It looks liks a similar effect was accomplished by using the unset() to remove unneeded columns.