Skip to content

Instantly share code, notes, and snippets.

Last active Dec 15, 2015
What would you like to do?
public class ArticleBuilder : BuilderBase
private ComponentPresentation TridionComponentPresentation { get; set; }
public ArticleBuilder(ComponentPresentation componentPresentation)
TridionComponentPresentation = componentPresentation;
public Article Build()
var tridionComponent = TridionComponentPresentation.Component;
var articleViewModel = new Article
Title = tridionComponent.Fields["title"].Value,
Summary = ResolveRichText(tridionComponent.Fields["short_intro"].Value),
RelatedLinks = tridionComponent.Fields["related_links"].Values.ToList()
//Work magic for XPM
return articleViewModel;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment