edit layout and template