add layout code in controller