Accessing Parent Document Type Field Value

Mukesh Kumar asked on October 13, 2014 10:04

Hi,

I have created a menu using Hierarchical transformation. The menu document type has all the field that are being used in Hierarchical transformation. Now i need to access the parent master document type field value inside this transformation.

The template is master template and the used Hierarchical viewer web part for creating menu. This Hierarchical viewer web part uses menu document type to render menu item. So now i want to access field value from master document type.

I tried to use below URL but it's not work.

http://devnet.kentico.com/questions/how-to-retrieve-a-parent-document-field-value

Recent Answers


Brenden Kehren answered on October 13, 2014 13:38

What version are you using? V8 syntax should be CurrentDocument.Parent.<property>

0 votesVote for this answer Mark as a Correct answer

Mukesh Kumar answered on October 13, 2014 15:17

I am using Kentico 8.1

0 votesVote for this answer Mark as a Correct answer

lawrence whittemore answered on June 16, 2016 17:18

Does that work with any field or only specific fields? I can get currentdocument.parent.documentname to work but when I try to use a custom field i get nothing.

0 votesVote for this answer Mark as a Correct answer

Stu Furlong answered on February 12, 2018 20:54

Maybe worth mentioning that in my case, I had to use Object.Parent.<myfield> - since CurrentDocument was the page displaying my children page types, but not actually the parent I was trying to find.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.