Take layout options first to support PJAX.