if(!this.parent){ this.parent = context.get(this.key, false); if(!this.parent){ throw new Error("extends tag used a variable that did not resolve"); } if(typeof this.parent == "object"){ if(this.parent.url){ if(this.parent.shared){ this.shared = true; } this.parent = this.parent.url.toString(); }else{ this.parent = this.parent.toString(); } } if(this.parent && this.parent.indexOf("shared:") == 0){ this.shared = true; this.parent = this.parent.substring(7, parent.length); } } var parent = this.parent; if(!parent){ throw new Error("Invalid template name in 'extends' tag."); } if(parent.render){ return parent; } if(this.parents[parent]){ return this.parents[parent]; } this.parent = this.getTemplate(dojox.dtl.text.getTemplateString(parent)); if(this.shared){ this.parents[parent] = this.parent; } return this.parent;