/// <summary> /// Returns breadcrumbs specific to the block that should be added to navigation /// based on the current page reference. This function is called during the page's /// oninit to load any initial breadcrumbs. /// </summary> /// <param name="pageReference">The <see cref="T:Rock.Web.PageReference" />.</param> /// <returns> /// A <see cref="T:System.Collections.Generic.List`1" /> of block related <see cref="T:Rock.Web.UI.BreadCrumb">BreadCrumbs</see>. /// </returns> public override List <BreadCrumb> GetBreadCrumbs(PageReference pageReference) { _rockContext = new RockContext(); _componentService = new InteractionComponentService(_rockContext); _component = _componentService.Get(PageParameter("ComponentId").AsInteger()); var breadCrumbs = new List <BreadCrumb>(); breadCrumbs.Add(new BreadCrumb(_component != null ? _component.Name : "Component", pageReference)); return(breadCrumbs); }
private static InteractionComponentCache LoadById2(int id, RockContext rockContext) { var interactionComponentService = new InteractionComponentService(rockContext); var interactionComponentModel = interactionComponentService.Get(id); if (interactionComponentModel != null) { return(new InteractionComponentCache(interactionComponentModel)); } return(null); }