secondspin Posted April 21, 2008 Posted April 21, 2008 Hi there, I've implemented one of the category dropdown menu contributions for the header of my website but I was looking to make a format change to it and have the category names in bold and leave the sub-categories as they were. Unfortunately I've tried quite a few things but don't know where I'd need to make the change. Can anybody help? The code for my includes/boxes/categories.php page is below: <?php /* osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2001 osCommerce Released under the GNU General Public License */ ?> <!-- categories //--> <tr> <td> <?php function tep_get_paths($categories_array = '', $parent_id = '0', $indent = '', $path='') { global $languages_id; if (!is_array($categories_array)) $categories_array = array(); $categories_query = tep_db_query("select c.categories_id, cd.categories_name from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where parent_id = '" . (int)$parent_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name"); while ($categories = tep_db_fetch_array($categories_query)) { if ($parent_id=='0'){ $categories_array[] = array('id' => $categories['categories_id'], 'text' => $indent . $categories['categories_name']); } else{ $categories_array[] = array('id' => $path . $parent_id . '_' .$categories['categories_id'], 'text' => $indent . $categories['categories_name']); } if ($categories['categories_id'] != $parent_id) { $this_path=$path; if ($parent_id != '0') $this_path = $path . $parent_id . '_'; $categories_array = tep_get_paths($categories_array, $categories['categories_id'], $indent . ' ', $this_path); } } return $categories_array; } $info_box_contents = array(); $info_box_contents[] = array('form' => '<form action="' . tep_href_link(FILENAME_DEFAULT) . '" method="get">' . tep_hide_session_id(), 'align' => 'left', 'text' => tep_draw_pull_down_menu('cPath', tep_get_paths(array(array('id' => '', 'text' => PULL_DOWN_DEFAULT))), $cPath, 'onchange="this.form.submit();"') ); new infoBox($info_box_contents); ?> </td> </tr> <!-- categories_eof //--> Any pointers would be great. Thanks!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.