You will need to list each product id that will be the first one in a section. You won't need to list the rest of them.
You do need to assign sort orders to all the products so they display in the correct sequence. Do this in the product editing page.
Another tweak is that some or all of these products will also appear in other categories where you don't want the subheadings. You will need to wrap another test around the code so it only checks for subheadings in the desired categories.
PHP Code:
// Following code will be executed only if Column Layout (Grid Layout) option is chosen
if (PRODUCT_LISTING_LAYOUT_STYLE == 'columns') {
if (in_array($_GET[cPath],explode(",",'category_paths_to_have_subheadings'))) { // check for subheading cats
$section_check = $listing->fields['products_id']; // subheadings - gjh42 20080913
$section_header = '';
if (in_array($section_check,explode(",",'list_ids_to_start_new_lines_here,separated_by_commas,and_no_spaces'))) {
$column != 0?$rows ++:'';
$column = -1;
switch ($section_check) {
case "first id":
$section_header = 'First Section';
break;
case "second id": //repeat case/$section/break for other ids to start headings
$section_header = 'Second Section';
break;
} //switch
$section_header = '<div class="sectionHeader">' . $section_header . '</div>';
} //if
$lc_text = $section_header . implode('<br />', $product_contents); // /subheadings
$list_box_contents[$rows][$column] = array('params' => 'class="centerBoxContentsProducts centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"',
'text' => $lc_text);
$column ++;
if ($column >= PRODUCT_LISTING_COLUMNS_PER_ROW) {
$column = 0;
$rows ++;
}
} // subheading cats
}
// End of Code fragment for Column Layout (Grid Layout) option in add on module
Replace
category_paths_to_have_subheadings
with a comma-separated list of the categories to get subheadings.