generate navigation macros