Helper function to render static pages from templates