PHP Code:
<?php
for ($i=65; $i<91; $i++) {
echo '<a href="'.chr($i).'">' . chr($i) . '</a>';
}
for ($i=48; $i<58; $i++) {
echo '<a href="'.chr($i).'">' . chr($i) . '</a>';
}
echo '<br class="clearBoth" />';
$manufacturers_query = "SELECT distinct manufacturers_id, manufacturers_name FROM " . TABLE_MANUFACTURERS . " ORDER BY manufacturers_name";
$manufacturers = $db->Execute($manufacturers_query);
while (!$manufacturers->EOF) {
if ($initial !== strtoupper(substr($manufacturers->fields['manufacturers_name'], 0, 1))) {
$initial = strtoupper(substr($manufacturers->fields['manufacturers_name'], 0, 1));
echo '<a name="#'.$initial.'">' . $initial . '</a><br />----------<br />';
}
?><a href="<?php echo zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . (int) $manufacturers->fields['manufacturers_id'], $request_type); ?>" ><?php echo $manufacturers->fields['manufacturers_name']; ?></a><br /><?php
$manufacturers->MoveNext();
}
?>
The above has been modified to add the manufacturer's link using the existing vertical formatting. The click from letter to section remains as was provided.