dump layouts when generating views

refer #498