Split visible_pages into two functions
* Need a separate function to check top level menu items