Adds $afterRender to cpt controllers