Document Type - Field Advanced Settings - Visible Condition

Kathryn Merlihan asked on October 1, 2014 16:22

Hi there,

I have a document type with a checkbox field that I would like to only make available for a specific page. It works perfectly before entering a Visible condition in the Field Advanced Settings. The problem I am having is that no matter what macro I put into the Visible Condition, the checkbox gets hidden for all documents of that document type. I used the steps from this thread to be completely sure I was doing it correctly, but have had no luck.

Any assistance would be helpful.

Things to note: I am on Kentico 7.0.82 and the document type is a custom document type inheriting from Page - Menu Item.

Cheers, Kathryn

Recent Answers

Sandro Jankovic answered on December 1, 2014 15:41

Hi Kathryn,

The issue seems to be that the document context does not exist while the document is being created which is why you are not able to use a standard macro. Instead, it should be possible to check the NodeID in the querystring, and only allow the document to be created under specific node IDs. The macro would look something like the following (where ==4 is your document node id): QueryString.GetValue("parentnodeid")==4

You can check which NodeID is being used by your documents under the Properties tab. Would this approach work for you?

Please let me know if you have any additional questions.

Best Regards,


0 votesVote for this answer Mark as a Correct answer

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