Add main element to layout template