Page type field visibility based on node level

D D asked on September 7, 2016 00:16

I've adding a new field (checkbox) to a page type and only want it displayed if the documents node level is 1. How can I do this in the visibility section of the field options? Currently I put CurrentDocument.NodeLevel == 1 but the new field doesn't show up.

What am I doing wrong here?

Correct Answer

Jan Hermann answered on September 7, 2016 00:17

EditedObject.NodeLevel==1

2 votesVote for this answer Unmark Correct answer

Recent Answers


Brenden Kehren answered on September 7, 2016 02:41

Jan provided the correct answer but the reason behind it is CurrentDocument is only available on the live or preview site. EditedObject is available on all form pages as a generic object for the Admin interface to get values from.

0 votesVote for this answer Mark as a Correct answer

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