private static void SetCurrentCategoryRelation(IModelTransformContext context, PropertyDictionary properties, IFacetContent source) { ContentReference currentCategoryLink; if (ContentReference.TryParse(context.QueryParameters.AllParameters["currentCategory"], out currentCategoryLink)) { properties["IsRelatedToCurrentCategory"] = source.NodeLinks != null && source.NodeLinks.Any(link => link.CompareToIgnoreWorkID(currentCategoryLink)); } else { properties["IsRelatedToCurrentCategory"] = true; } }
private static void SetHasChildrenForEntryContent(IModelTransformContext context, IFacetContent source) { var structureStoreContentDataModel = context.Target as StructureStoreContentDataModel; if (structureStoreContentDataModel == null) { return; } structureStoreContentDataModel.HasChildren = source.VariationLinks != null && source.VariationLinks.Any(); }