dynamically add header and footer to all pages