// GET: Footer public ActionResult Footer() { var ds = _renderingContext.GetDataSource(); var model = _context.GetItem <FooterModel>(new Guid(_renderingContext.GetDataSource())); return(View(model)); }
public ActionResult Index() { //var ds = _renderingContext.GetDataSource(); var model = _context.GetItem <MediaCardModel>(new Guid(_renderingContext.GetDataSource())); return(View(model)); }
// GET: Executive public ActionResult Index() { var xyz = _context.GetCurrentItem <ExecutiveModel>(); var model = _context.GetItem <ExecutiveModel>(new Guid(_renderingContext.GetDataSource())); model.BannerImage = xyz.BannerImage; model.Description = xyz.Description; return(View(model)); }
// GET: Banner public ActionResult Index() { //Template template = TemplateManager.GetTemplate(new Sitecore.Data.ID("{03FADF59-F22D-48C6-B13F-48A9B7281BC2}"), Sitecore.Context.Database); Database database = Sitecore.Context.Database; Item myItem = database.GetItem(new Sitecore.Data.ID("{42CDF7FF-6D07-4FC3-A609-D2FF4EF1181A}")); var fieldValue = myItem.Fields["Title"].Value; string desc = myItem.Fields["Desc"].Value; string Title = myItem.Fields["Title"].Value; string LinkText = myItem.Fields["LinkText"].Value; //template.GetField("LinkText").DefaultValue; // string desc = template.GetField("Desc").DefaultValue; //TemplateField[] allFields = template.GetFields(false); var model = _context.GetItem <RYWebsite.Models.Banner>(new Guid(_renderingContext.GetDataSource())); model.Desc = desc; model.Title = Title; model.LinkText = LinkText; return(View(model)); }
// GET: Search public ActionResult Search() { var model = _context.GetItem <SearchModel>(new Guid(_renderingcontext.GetDataSource())); return(View("/Views/Header/Search.cshtml", model)); }
public string GetDataSource() { return(_renderingContext.GetDataSource()); }
// GET: Logo public ActionResult Logo() { var model = _context.GetItem <Logo>(new Guid(_renderingContext.GetDataSource())); return(View("/Views/Header/Logo.cshtml", model)); }
// GET: PrimaryNavigation public ActionResult Index() { var model = _context.GetItem <PrimaryNav>(new Guid(_renderingContext.GetDataSource())); return(View("/Views/Header/PrimaryNav.cshtml", model)); }
public T Get <T>() where T : class, IGlassBase { return(RenderingContext.HasDataSource ? GlobalService.GetItem <T>(RenderingContext.GetDataSource()) : SitecoreContext.GetCurrentItem <T>()); }