Last active
February 10, 2016 22:35
-
-
Save daniiiol/aff6b616365961797a53 to your computer and use it in GitHub Desktop.
Sitecore Software Design Blog
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 TitleController : Controller | |
{ | |
private readonly ISitecoreRenderingContext _renderingContext; | |
private readonly ITitleService _TitleService; | |
public TitleController(ISitecoreRenderingContext renderingContext, ITitleService TitleService) | |
{ | |
_renderingContext = renderingContext; | |
_TitleService = TitleService; | |
} | |
public ActionResult TitleNormal() | |
{ | |
var datasource = _renderingContext.GetDataItem<INormalTitleTemplate>(); | |
var TitleModel = _TitleService.GetNormalTitle(datasource); | |
var model = new TitleViewModel | |
{ | |
Title = TitleModel.Title, | |
Secondary = TitleModel.Secondary, | |
Type = TitleModel.Type | |
}; | |
return View(ModuleName, model); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment