}
if (StringUtils.isNotEmpty(extendsName)) {
// extends.nested=nested
Object oldNested = null;
if (StringUtils.isNotEmpty(extendsNested)) {
oldNested = context.put(extendsNested, new ListenerTemplate(template, listener));
}
try {
Template extend = fileMethod.$extends(extendsName, template.getLocale(), template.getEncoding());
extend.render(context.getOut());
} finally {