Simplify layout text with def "function" from Mako.