Anders Hattestad
Feb 8, 2016
  2437
(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

Comments

Please login to comment.
Latest blogs
Optimizely Forms: You cannot submit this form because an administrator has turned off data storage.

Do not let this error message scare you, the solution is quite simple!

Tomas Hensrud Gulla | Oct 4, 2024 | Syndicated blog

Add your own tools to the Optimizely CMS 12 admin menu

The menus in Optimizely CMS can be extended using a MenuProvider, and using the path parameter you decide what menu you want to add additional menu...

Tomas Hensrud Gulla | Oct 3, 2024 | Syndicated blog

Integrating Optimizely DAM with Your Website

This article is the second in a series about integrating Optimizely DAM with websites. It discusses how to install the necessary package and code t...

Andrew Markham | Sep 28, 2024 | Syndicated blog

Opticon 2024 - highlights

I went to Opticon in Stockholm and here are my brief highlights based on the demos, presentations and roadmaps  Optimizely CMS SaaS will start to...

Daniel Ovaska | Sep 27, 2024