Skip to content

Instantly share code, notes, and snippets.

@daniiiol
Created February 10, 2016 22:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daniiiol/3b282a9c470f3e079701 to your computer and use it in GitHub Desktop.
Save daniiiol/3b282a9c470f3e079701 to your computer and use it in GitHub Desktop.
public class TitleLogic : ITitleLogic
{
public TitleNormalModel GetNormalTitle(INormalTitleTemplate normalTitleTemplate)
{
var model = new TitleNormalModel();
var type = normalTitleTemplate.TitleTypeField.TargetItem<ITitleTypeItemTemplate>();
model.Title = normalTitleTemplate.TitleField.Render().ToString();
model.Secondary = normalTitleTemplate.SecondaryField.Render().ToString();
model.Type = type != null ? type.TypeField.Value : 2;
return model;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment