Extracted out rendering of main page content into a macro.