added loader function for header and footer template