Brimbox Logo Brimbox Version 2.3.4 Released


Returns the first list list_number available. In Brimbox, all lists can be empty, so this function will return 1 if there are no lists set in a given layout.

Class: bb_main, called as $main

File: bb_main.php (php)


function get_default_list($arr_list, $archive = 1)


$default_list_number = $main->get_default_list($arr_list, $archive = 1);

Returns: $list_number or first unarchived list when archive is 1. Returns 1 if no lists are set.

Parameter: $arr_list (array)
$arr_list is the list array from the json_table in the database for the current $row_type. $arr_list is stored in order.

Parameter: $archive (optional integer)
If $archive is set function will only return lists with an archive level less than $archive value. If $archive is 0, all lists are considered.

Updated: 2016-07-17