Register controller and template