using compile helper to render appropriate sidebar and content for each route