Fixing functions for the use of the new menu and the proper way to get the template url for the footer