I thank @lat9 @mc12345678
Sorry, I kinda threw this together waiting in an airport trying to get back home
The below code will achieve the layout your going for, inherits @mc12345678 manufacturer links and changes the anchor tags to properly "goto" correct location on page.
Removing 0-9 and combining all numeric results will take some additional coding, I literally just walked in my door and will look at it a little more.
I like the website btw, can I ask what influenced your decision in going with bootstrap?
<?php
echo '<div id="alphanumericWrapper">';
echo 'Manufacturers ';
for ($i=65; $i<91; $i++) {
echo '<a href="'. $_SERVER['REQUEST_URI'] . '#' . chr($i).'">' . chr($i) . '</a>';
}
for ($i=48; $i<58; $i++) {
echo '<a href="'. $_SERVER['REQUEST_URI'] . '#' . chr($i).'">' . chr($i) . '</a>';
}
echo '</div>';
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 '<br class="clearBoth" />';
echo '<a name="'.$initial.'" class="bold bigger defaultColor">' . $initial . '</a>';
echo '<br class="clearBoth" />';
}
echo '<div style="width: 33.3%; float: left;"><a href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . (int) $manufacturers->fields['manufacturers_id'], $request_type) . '">' . $manufacturers->fields['manufacturers_name'] . '</a></div>';
$manufacturers->MoveNext();
}
echo '<br class="clearBoth" />';
?>
clint6998:
Modified code works great except for one thing. Each letter at the top of the page A B C... ends up looking like this:
http://tacticaloffense.com/store/J
instead of moving down the page to the letter "J"
ALso, I would like to ditch the numbers of 0-9 and just replace it with the # sign.
Also, "About Us" plugin works great!!!
http://tacticaloffense.com/store/index.php?main_page=manufacturers_map
is the new page