We have a site with training materials. The content comes from a cross-site publishing library in a different site collection and the urls are rewritten to point to the local site.
We have put multiple related items into a folder, for example, a video demonstration of a computer system, a downloadable pdf of the keyboard shortcuts, and a webpage with some written instructions and tips. For this example let's say that it is how to set up managed navigation in SharePoint.
In the search results, we want to show the results for the video, pdf, webpage, and overall parent folder. But instead of going directly to the individual item, we want all four of them to point to the page for the parent folder. All the items inside the folder have specific content types, so I could make a special item template to render the appropriate destination link, but I can't figure out how to get the parent link.
There is a default managed property call
ParentLink and I see that in my item template, but it is the source url, not the local rewritten URL. For example:
//Managed properties on child item
OriginalPath:https://catalogSite/Pages/Navigation Tutorial/Video tutorial
//Managed properties on parent item
We don't want the child item's search result to go to the page at /topic/tutorials/56, we want it to point to the parent folder url at /topic/tutorials/12, but the ParentLink property is the original catalog site...which the users don't even have access to. We want them to be able to see that this specific pieces is part of a larger whole.
Is there a way to request the rewritten urls for ParentLink? Or some other way to direct the user to the right place?
I've also thought about removing the children items from the search results, but the parent folder contains only a little metadata and content. All the juicy meaning words and terms that the user is likely to search on are contained in the children items. So I don't think this would be a good approach.
Any clever ideas?