Only have submenu in html when necessary