diff --git a/src/Articulate/Routing/ArticulateRouter.cs b/src/Articulate/Routing/ArticulateRouter.cs index c8fab78..2d95db3 100644 --- a/src/Articulate/Routing/ArticulateRouter.cs +++ b/src/Articulate/Routing/ArticulateRouter.cs @@ -153,7 +153,14 @@ private void MapRoute( _routeCache[art] = dynamicRouteValues; } - dynamicRouteValues.Add(articulateRootNode.Id, domains.Where(x => x.ContentId == articulateRootNode.Id).ToList()); + dynamicRouteValues.Add(articulateRootNode.Id, DomainsForContent(articulateRootNode,domains)); + } + + private List DomainsForContent(IPublishedContent content, IReadOnlyList domains) + { + var nodePaths = new HashSet(content.Path.Split(",").Select(int.Parse).ToList()); + + return domains.Where(domain => nodePaths.Contains(domain.ContentId)).ToList(); } private void MapOpenSearchRoute(HttpContext httpContext, string rootNodePath, IPublishedContent articulateRootNode, List domains)