November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
Find all use of a file
UnifiedFile File;
SoftLinkCollection referers = SoftLink.Load(File);
foreach (SoftLink refLink in referers)
{
p = DataFactory.Instance.GetPage(refLink.OwnerPageLink);
If its a Page File
PageData ownerPage = UnifiedDirectory.GetOwnerPageFromVirtualPath(File.VirtualPath);
Our client would like to have a breadcrumb indicating the hierachy of pages leading to the page that holds each file that is returned in EPiServer search results, when files are returned. This looked straightforward as the search results are a collection of PageData objects, and we should be able to navigate up to the pages parent page(s) until we reach the start page for the search, and then dispaly this hierarchy of pages as the breadcrumb.
However, we hit a serious snag when we found that the PageData objects returned for file search result items is completely missing all PageRef, PageGuid, and Parent page reference. In short, the PageData object seems to have absolutely no link to the page tree at all, so we have no way to determine the page that holds the file in the search results.
Does anyone know of a solution to this?