HexagonSystems/website — pull request #43 by stephenmcm (2013-11-19 06:15:52+00:00)
Title: Feature/navigation - Converted the navigation to dynamically load from the database.

Converted the navigation to dynamically load from the database.
I'm attaching the SQL needed to generate the menu in the DB here.

Begin SQL
=================
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";

CREATE TABLE IF NOT EXISTS `menu` (
`menuId` int(11) NOT NULL AUTO_INCREMENT,
`acl` int(1) NOT NULL DEFAULT '0',
`name` varchar(45) NOT NULL,
`link` varchar(255) DEFAULT NULL,
`parentId` int(11) DEFAULT NULL,
`inMenu` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`menuId`),
KEY `parentId` (`parentId`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=14 ;

--
-- Dumping data for table `menu`
--

INSERT INTO `menu` (`menuId`, `acl`, `name`, `link`, `parentId`, `inMenu`) VALUES
(1, 0, 'About', 'aboutPage', NULL, 0),
(2, 0, 'Projects', 'projectsPage', NULL, 0),
(3, 0, 'Contact', 'contactPage', NULL, 0),
(5, 0, 'Tasks', 'timesheetPage', NULL, 0),
(7, 1, 'Admin', 'adminPage', NULL, 1),
(9, 1, 'Config', 'configPage', NULL, 1),
(10, 0, 'Login', 'login', NULL, 1),
(11, 1, 'Log Out', 'login&action=logout', NULL, 1),
(12, 0, 'Sub Task', 'subtask', 5, 0),
(13, 0, 'Other Sub Task', 'subtask2', 5, 0);