Try our conversational search powered by Generative AI!

Anders Hattestad
Feb 8, 2016
(3 votes)

Get owner content of document in “for this page”

A quick tip for finding owner page.

var contentAssetHelper = ServiceLocator.Current.GetInstance<ContentAssetHelper>();

var ownerNode = contentAssetHelper.GetAssetOwner(media.ContentLink);

It is also worth to mention that the standard EPiServer Search will index local files bellow contentlink 4, or if you drag the current page "for this page" folder inside a contentarea it will give you the same value.

VirtualPathQuery pathQuery = new VirtualPathQuery();
pathQuery.AddContentNodes(bellow, serviceLocationHelper.ContentLoader());

Feb 08, 2016


Please login to comment.
Latest blogs
Build a headless blog with Astro and Optimizely SaaS CMS

I’m a big fan of using the right tool for the right job. I’m also a big fan of Astro , for the right use case. Let's explore Astro to see what it's...

Jacob Pretorius | May 28, 2024

Microsoft announces Natural language to SQL

Finally, Microsoft launches "Natural language to SQL," after it has been available for several months in Optimizely CMS!

Tomas Hensrud Gulla | May 23, 2024 | Syndicated blog

Five easy ways to start personalizing your content right now

If you clicked on this article, you already know that getting the right message to the right person at the right time helps drive conversions and...

Kara Andersen | May 23, 2024

ExtendedCms.TinyMceEnhancements – serwer side webp support

Today I will introduce another small feature of TinyMceEnhancements plugin. The functionality is used to automatically detect whether a browser...

Grzegorz Wiecheć | May 22, 2024 | Syndicated blog