diff --git a/Nustache.Core/Template.cs b/Nustache.Core/Template.cs index acdda4d..5791a7c 100644 --- a/Nustache.Core/Template.cs +++ b/Nustache.Core/Template.cs @@ -6,7 +6,12 @@ namespace Nustache.Core public class Template : Section { public Template() - : base("#template") // I'm not happy about this fake name. + : this("#template") // I'm not happy about this fake name. + { + } + + public Template(string name) + : base(name) { } diff --git a/Nustache.Core/TemplateDefinition.cs b/Nustache.Core/TemplateDefinition.cs index 60a619f..78be378 100644 --- a/Nustache.Core/TemplateDefinition.cs +++ b/Nustache.Core/TemplateDefinition.cs @@ -1,6 +1,8 @@ namespace Nustache.Core { - public class TemplateDefinition : Section + public class TemplateDefinition : Template // This derives from Template so that it can + // be returned from a TemplateLocator. + // Should we make it implement an interface instead? { public TemplateDefinition(string name) : base(name) diff --git a/Nustache.Mvc3.Example/Views/Home/Index.mustache b/Nustache.Mvc3.Example/Views/Home/Index.mustache index 206052d..10747ec 100644 --- a/Nustache.Mvc3.Example/Views/Home/Index.mustache +++ b/Nustache.Mvc3.Example/Views/Home/Index.mustache @@ -2,4 +2,8 @@
{{ Message }} -
\ No newline at end of file + + +{{Now including section defined in the view:
+ {{>Section}}