Skip to content

Instantly share code, notes, and snippets.

@daniiiol
Last active February 10, 2016 22:35
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/aff6b616365961797a53 to your computer and use it in GitHub Desktop.
Save daniiiol/aff6b616365961797a53 to your computer and use it in GitHub Desktop.
Sitecore Software Design Blog
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