public static RenderingContext Create(HtmlHelper html, string propertyName) { var context = new RenderingContext(); context.Content = html.CurrentItem(); var template = html.ResolveService<ITemplateAggregator>().GetTemplate(context.Content); if (template != null) context.Displayable = template.Definition.Displayables.FirstOrDefault(d => d.Name == propertyName); context.Html = html; context.PropertyName = propertyName; return context; }