RecordCount(); $row = 0; $col = 0; $list_box_contents = ''; if ($num_categories > 0) { if ($num_categories < MAX_DISPLAY_CATEGORIES_PER_ROW || MAX_DISPLAY_CATEGORIES_PER_ROW == 0) { $col_width = floor(100/$num_categories); } else { $col_width = floor(100/MAX_DISPLAY_CATEGORIES_PER_ROW); } while (!$categories->EOF) { if (!$categories->fields['categories_image']) !$categories->fields['categories_image'] = 'pixel_trans.gif'; $cPath_new = zen_get_path($categories->fields['categories_id']); // strip out 0_ from top level cats $cPath_new = str_replace('=0_', '=', $cPath_new); // $categories->fields['products_name'] = zen_get_products_name($categories->fields['products_id']); $list_box_contents[$row][$col] = array('params' => 'class="col-lg-3 col-md-3 col-sm-6 col-xs-6"', 'text' => '
'); $col ++; if ($col > (MAX_DISPLAY_CATEGORIES_PER_ROW -1)) { $col = 0; $row ++; } $categories->MoveNext(); } } ?>