Hi Jason,
I've created 2 new tables in my database and replicated the naming conventions etc.
Here's the basic structure:
itemcategories table and items
CatID Catname Catlink
1 Category 1 _page1.php
2 Category 2 _page2.php
items table and items
ItemID ItemCatID ItemName ItemLink
1 2 Sub-Link1 _page2.php
2 2 Sub-Link2 _page2.php
3 2 Sub-Link3 _page2.php
4 2 Sub-Link4 _page2.php
I've set all the items as Category 2, so that all rollovers are in that category only.
But I get no rollover sub munu.
Could the problem be that the Category menu is the horizontal 'top' menu and the Items menu is a vertical rollover menu. But on unfiltered tests this doesn't seem to be a problem.
Thanks
Nathan
menu.php file extract:
<?php
mysql_select_db($database_content, $content);
$query_menuwriter_itemcategories = "SELECT Catlink, Catname, CatID FROM itemcategories";
$menuwriter_itemcategories = mysql_query($query_menuwriter_itemcategories, $content) or die(mysql_error());
$row_menuwriter_itemcategories = mysql_fetch_assoc($menuwriter_itemcategories);
$totalRows_menuwriter_itemcategories = mysql_num_rows($menuwriter_itemcategories);
?>
<ul class="level-0" id="cssmw_home">
<?php if ($totalRows_menuwriter_itemcategories > 0) { // Show if recordset not empty ?>
<?php do { ?>
<li class="parent"><a href="<?php echo($assumedRoot); ?><?php echo $row_menuwriter_itemcategories["Catlink"]; ?>"><?php echo $row_menuwriter_itemcategories["Catname"]; ?></a>
<?php
// MenuWriter Nested Filter Variable
$_POST["menuwriter_items_CatID"] = $row_menuwriter_itemcategories["CatID"];
?>
<?php
$MenuWriter_menuwriter_items = "-1";
if (isset($_POST['menuwriter_items_CatID'])) {
$MenuWriter_menuwriter_items = (get_magic_quotes_gpc()) ? $_POST['menuwriter_items_CatID'] : addslashes($_POST['menuwriter_items_CatID']);
}
mysql_select_db($database_content, $content);
$query_menuwriter_items = sprintf("SELECT ItemLink, ItemName, ItemID, ItemCatID FROM items WHERE ItemCatID=%s", GetSQLValueString($MenuWriter_menuwriter_items, "int"));
$menuwriter_items = mysql_query($query_menuwriter_items, $content) or die(mysql_error());
$row_menuwriter_items = mysql_fetch_assoc($menuwriter_items);
$totalRows_menuwriter_items = mysql_num_rows($menuwriter_items);
?>
<ul class="level-1">
<?php if ($totalRows_menuwriter_items > 0) { // Show if recordset not empty ?>
<?php do { ?>
<li><a href="<?php echo($assumedRoot); ?><?php echo $row_menuwriter_items["ItemLink"]; ?>"><?php echo $row_menuwriter_items["ItemName"]; ?></a></li>
<?php } while ($row_menuwriter_items = mysql_fetch_assoc($menuwriter_items)); ?>
<?php } // Show if recordset not empty ?>
</ul>
<?php
mysql_free_result($menuwriter_items);
?>
</li>
<?php } while ($row_menuwriter_itemcategories = mysql_fetch_assoc($menuwriter_itemcategories)); ?>
<?php } // Show if recordset not empty ?>
</ul>
<?php
mysql_free_result($menuwriter_itemcategories);
?>