Created
February 10, 2016 22:38
-
-
Save daniiiol/3b282a9c470f3e079701 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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