This table design will not work with the CSS Menu Writer Dynamic Menus.
For the Dynamic menus to work, the top level will need to be static, the sub menus can be dynamic though.
For example, take the menu in the screen shoot of the dynamic menus tutorial.
mw2_creating_dynamic_menus_ht.pdf
this menu is using two tables:
CREATE TABLE `items` (
`ItemID` int(10) NOT NULL AUTO_INCREMENT,
`ItemCatID` int(10) DEFAULT NULL,
`ItemName` varchar(255) DEFAULT NULL,
`ItemShortDesc` varchar(100) DEFAULT NULL,
`ItemLongDesc` longtext,
`ItemPrice` decimal(19,2) DEFAULT NULL,
`ItemSKU` varchar(255) DEFAULT NULL,
`ItemThumb` varchar(255) DEFAULT NULL,
`ItemImage` varchar(255) DEFAULT NULL,
`ItemWeight` double(7,2) DEFAULT NULL,
PRIMARY KEY (`ItemID`),
KEY `ItemsItemCatID` (`ItemCatID`),
KEY `ProductID` (`ItemID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=31 ;
--
-- Dumping data for table `items`
--
INSERT INTO `items` VALUES(1, 1, 'Body Double', 'The latest from Jenna Darleen', 'Get the latest tunes from this hot new star whose work truly rocks the house with her classic L.A.style and penetrating lyrics.', 19.99, 'BSM_001', 'cd1.jpg', 'cd1.jpg', 0.50);
INSERT INTO `items` VALUES(2, 1, 'So Last Season', 'Greatest hits of the past 6 months', 'Replay the best tunes from just six months ago with this classic collection of number one hits from the oh-so-recent past.', 19.99, 'BSM_002', 'cd2.jpg', 'cd2.jpg', 0.50);
INSERT INTO `items` VALUES(3, 1, 'HotFlash', 'Super songs from 8 track days', 'Even if don''t have a clue what an 8 track player looks like, you''ll remember these songs: they''re burned into your psyche!', 19.99, 'BSM_003', 'cd3.jpg', 'cd3.jpg', 0.50);
INSERT INTO `items` VALUES(4, 1, 'A-Go-Go', 'Dancing music - pure and simple', 'Break out the boots and get pumping - these tunes are meant to get you moving - and they''ll be no stopping them this time!', 19.99, 'BSM_004', 'cd4.jpg', 'cd4.jpg', 0.50);
INSERT INTO `items` VALUES(5, 1, 'Filtered Light', 'New world music from Jazzy G', 'Make way for Jazzy G''s slamming new set of love smashes and top spinning aces that serves it up with a phat baseline beat.', 24.99, 'BDM_005', 'cd5.jpg', 'cd5.jpg', 0.50);
INSERT INTO `items` VALUES(6, 1, 'DV8: Tendencies', 'Metal rap like you never heard it', 'Nu music for rapcore fans to rock all the kids in your crazy town as they rage against the machine and run da mc to the ground.', 19.99, 'BDM_006', 'cd6.jpg', 'cd6.jpg', 0.50);
INSERT INTO `items` VALUES(7, 2, 'Travel Mug', 'Java on the go, in style', 'Sleek stainless steel in a high polish colbalt steel travel mugs complete with no-drip lids, certified to keep your hots, hot and your colds, cold.', 9.99, 'BDM_007', 'gr1.jpg', 'gr1.jpg', 1.50);
INSERT INTO `items` VALUES(8, 2, 'Travel Tote', 'Carry your goodies with flair', 'Comfortable, secure, stylish and versative: that''s our tote! Includes a pocket for a phone, passport, keys and zippered pocket in the front for money or small wallet.', 9.99, 'BDM_008', 'gr2.jpg', 'gr2.jpg', 1.00);
INSERT INTO `items` VALUES(9, 2, 'Ball Cap', 'Noggin wear, like no other', ' Be comfortable when you walk around town or down the trail in your Blue Sky Music ball cap. This nifty ball cap keeps perspiration away from your head to help keep you dry and cool.', 9.99, 'BDM_009', 'gr3.jpg', 'gr3.jpg', 1.00);
INSERT INTO `items` VALUES(10, 2, 'Sport Backpack', 'Fashionable and practical carryall', 'Our day pack is designed for virtually any outdoor activity and loaded with features at an exceptional price. Keep on keeping on with multiple pockets inside and out, back and front.', 29.99, 'BDM_010', 'gr4.jpg', 'gr4.jpg', 4.00);
INSERT INTO `items` VALUES(11, 2, 'Knit Cap', 'One cozy head, coming up', 'Keep your head warm this winter with our stylish, unisex, winter beanie. This beanie comes in a universally stylish color ready to match your any outfit. Perfect for skiers and snowboarders!!', 19.99, 'BDM_011', 'gr5.jpg', 'gr5.jpg', 3.00);
CREATE TABLE `itemcategory` (
`ItemCatID` int(10) NOT NULL AUTO_INCREMENT,
`ItemCatName` varchar(50) DEFAULT NULL,
PRIMARY KEY (`ItemCatID`),
KEY `CategoryID` (`ItemCatID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;
--
-- Dumping data for table `itemcategory`
--
INSERT INTO `itemcategory` VALUES(1, 'CD');
INSERT INTO `itemcategory` VALUES(2, 'Gear');
the main level menu will look like:
About Us
Products
Products Search
Now select Products and add a dynamic menu, this one will use the itemcategory table. Set the Label as itemCatName, set the key Column to itemCatID
Now, you will create the nested menu.
add a new dynamic submenu under the one you just created, this will use the items table. Set the label to sue the Item Name, set the ID to use the itemCatID column. In the filtering section, select the nested option.
see the screen shoots attached for more details.