public ActionResult BodyBottom(RenderingActionArgs args) { var model = _modelBuilder.Build(args.RenderingContextItem, ThemeResourceLocationIDs.BodyBottom, new ID(args.PageContext.Device.Id), SiteScriptsFieldNames.SiteFootScript, PageScriptsFieldNames.PageFootScript); return(View(model)); }
public ActionResult BodyTop(RenderingActionArgs args) { var model = _modelBuilder.Build(args.RenderingContextItem, ThemeResourceLocationIDs.BodyTop, new ID(args.PageContext.Device.Id), null, null); return(View(model)); }
public ActionResult Fragment(RenderingActionArgs args) { var model = new FragmentModel { WebEditUrl = string.Format("/?sc_mode=edit&sc_itemid={0}&sc_lang={1}", HttpUtility.UrlEncode(args.DatasourceItem.ID.ToString()), args.DatasourceItem.Language) }; return(View(model)); }
public ActionResult ResponsiveImage(ResponsiveImageRenderingParameters args, RenderingActionArgs renderingActionArgs) { var model = new ResponsiveImageViewModel { Item = renderingActionArgs.DatasourceItem, CssClass = args.CssClass }; if (args.ResponsiveImageProfile != null) { model.Profile = new ResponsiveImageProfile(args.ResponsiveImageProfile); } return(View(model)); }
public System.Web.Mvc.ActionResult Section(GeneratedNavigationRenderingParameters args, RenderingActionArgs renderingArgs) { var rootItem = renderingArgs.DatasourceItem ?? RenderingContext.Current.GetSectionLandingPage(RenderingContext.Current.PageContext.Item) ?? RenderingContext.Current.PageContext.Item; var model = new SectionNavigationViewModel { RootItem = new NavigableItem(rootItem), Levels = args.NavigationLevels <= 0 ? 1 : args.NavigationLevels, IncludeTopLevel = args.IncludeTopLevel }; return(View(model)); }
public System.Web.Mvc.ActionResult Primary(GeneratedNavigationRenderingParameters args, RenderingActionArgs renderingArgs) { var rootItem = renderingArgs.DatasourceItem ?? RenderingContext.Current.GetHomeItem(); var model = new MainNavigationViewModel { MenuItems = rootItem == null ? new NavigableItem[0] : new NavigableItem(rootItem).PrimaryNavChildren, Levels = args.NavigationLevels <= 0 ? 3 : args.NavigationLevels, CssClass = args.CssClass, TopLevelListClass = args.TopLevelListClass, TopLevelListItemClass = args.TopLevelListItemClass, TopLevelLinkClass = args.TopLevelLinkClass, ChildListClass = args.ChildListClass, ChildListItemClass = args.ChildListItemClass, ChildLinkClass = args.ChildLinkClass }; return(View(model)); }