Contributions
categories menu
pure css menu
modify header.php:
replace
<?php
tep_show_category
.
.
.
?>
to
<!--[if gte IE 5]><![if lt IE 7]>
<style type="text/css">
ul.makeMenu li { behavior: url(http://<?=$_SERVER['HTTP_HOST']?>/IEmen.htc ); }
ul.makeMenu ul { display: none; position: absolute; top: 0px; left: 190px; }
</style>
<![endif]><![endif]-->
<link rel="stylesheet" type="text/css" href="menu.css">
<?
function tep_show_category($parent_id) {
$categories_query = tep_db_query("select c.categories_id, cd.categories_name from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '$parent_id' and c.categories_id = cd.categories_id order by sort_order, cd.categories_name");
if (tep_db_num_rows($categories_query)) {
if($parent_id==0){
echo "<UL class=makeMenu>";
}else{
echo "<UL>";
}
while ($row = tep_db_fetch_array($categories_query)) {
echo "<LI>";
echo "<A HREF='index.php?cPath=".$row['categories_id'];
if($parent_id ==0 ) echo "' style='background-image:url(images/m26.gif);background-position:left;background-repeat:no-repeat;";
echo "'>".$row['categories_name']."</a>";
tep_show_category($row['categories_id']);
echo "</LI>
";
}
echo "</UL>";
}
}
tep_show_category(0);
?>
| 16 Nov 2006 |
pure css menu
modify header.php:
replace
<?php
tep_show_category
.
.
.
?>
to
<!--[if gte IE 5]><![if lt IE 7]>
<style type="text/css">
ul.makeMenu li { behavior: url(http://<?=$_SERVER['HTTP_HOST']?>/IEmen.htc ); }
ul.makeMenu ul { display: none; position: absolute; top: 0px; left: 190px; }
</style>
<![endif]><![endif]-->
<link rel="stylesheet" type="text/css" href="menu.css">
<?
function tep_show_category($parent_id) {
$categories_query = tep_db_query("select c.categories_id, cd.categories_name from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '$parent_id' and c.categories_id = cd.categories_id order by sort_order, cd.categories_name");
if (tep_db_num_rows($categories_query)) {
if($parent_id==0){
echo "<UL class=makeMenu>";
}else{
echo "<UL>";
}
while ($row = tep_db_fetch_array($categories_query)) {
echo "<LI>";
echo "<A HREF='index.php?cPath=".$row['categories_id'];
if($parent_id ==0 ) echo "' style='background-image:url(images/m26.gif);background-position:left;background-repeat:no-repeat;";
echo "'>".$row['categories_name']."</a>";
tep_show_category($row['categories_id']);
echo "</LI>
";
}
echo "</UL>";
}
}
tep_show_category(0);
?>
Note: Contributions are used at own risk.
