Reg: Automatically implemented Alternative forms

vinod Reddy asked on January 5, 2015 11:58

He There,

I am using kentico 8.1. I have requirement like getting the document ID in to Document type automatically implemented alternative form for update to an label when editing a record/Document.

How can i get this. I have tried by using some thing like {% DocumentID #%} but no luck, for this i am getting current page DocumentID but not the exact Updating records documentID.

Can any one help me on this?

Thanks in Advance.

Recent Answers


Brenden Kehren answered on January 5, 2015 13:58

What do you mean by "...for this i am getting current page DocumentID but not the exact Updating records documentID." You're getting a document ID but not the expected one?

0 votesVote for this answer Mark as a Correct answer

vinod Reddy answered on January 5, 2015 14:07 (last edited on March 24, 2018 12:15)

Hi @Brenden,
Thanks for your response.
Sorry for my bad explanation, I mean that when i am using the macro like {% DocumentID %} i am getting current document ID but not the actual editing item DocumentID. To say i am editing the document from the uni-grid by clicking on the grid action edit.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on January 5, 2015 14:48

When editing your page type from the form view, the current document ID is correct. The editing "document ID" would be the ID you entered on that page type when creating it. For instance if you look at the Article page type, ArticleID is the primary key/ID. That is the physical ID of that record not the DocumentID.

To be clear, when adding/editing items in the content tree there are 3 different main objects:

  • node (maintains hierarchy)
  • document (contains overall page data, title, metadata, etc.)
  • page type (content that gets displayed on a document)
0 votesVote for this answer Mark as a Correct answer

vinod Reddy answered on January 6, 2015 06:25 (last edited on December 10, 2019 02:30)

Thanks for your response Brenden,

I am not using the Form Tab/View of kentico's backend (i.e Desk), am using form in my site which will be visible to the user when clicked on uni-grid edit action.
I have tried by using another filed(label) on my automatically implemented alternative form with default data like current document ID(i.e using {% Currentdocument.DocumentID |(identity)GlobalAdministrator%} , But no luck.
As you said i agree with the primary key relation and the scope of the tree objects.
Is there any workaround to get the DocumentID in to my editing form?

0 votesVote for this answer Mark as a Correct answer

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