adding dynamic menus to header and footer