moved nav links to nav_links table and used render_template