protected virtual void WrapWithTemplate(ContentFile model, string templateName) { var bodyWriter = new StringWriter(); bodyWriter.WriteLine("{{% extends {0} -%}}", templateName); bodyWriter.WriteLine("{{% block {0}_content -%}}", templateName); bodyWriter.WriteLine(model.Body); bodyWriter.WriteLine("{% endblock -%}"); model.Body = bodyWriter.ToString(); }
protected virtual void WrapWithTemplate(ContentFile model) { var template = model.Metadata["template"]; if (template == null) return; WrapWithTemplate(model, template); }