public ContentScope(ContentItem newCurrentItem, ContentHelperBase contentHelper) { this.contentHelper = contentHelper; previousGetter = contentHelper.PathGetter; contentHelper.PathGetter = () => new PathData { CurrentItem = newCurrentItem, CurrentPage = newCurrentItem.IsPage ? newCurrentItem : previousGetter().CurrentPage }; }
public ContentScope(ContentItem newCurrentItem, ContentHelperBase contentHelper) { this.contentHelper = contentHelper; previousGetter = contentHelper.Current.PathGetter; contentHelper.Current.PathGetter = () => new PathData { CurrentItem = newCurrentItem, CurrentPage = newCurrentItem.IsPage ? newCurrentItem : previousGetter().CurrentPage }; }
public ContentScope(PathData newCurrentPath, ContentHelperBase contentHelper) { this.contentHelper = contentHelper; previousGetter = contentHelper.Current.PathGetter; contentHelper.Current.PathGetter = () => newCurrentPath; }