Custom document data

  Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic! Mail us feedback on this topic!  

In some cases, you may need to add custom data to all documents. In this case, you can use the NodeCustomData or DocumentCustomData (culture specific) fields in the CMS_Tree and CMS_Document database tables, respectively.

 

These fields are accessible through the following properties of the document (TreeNode):

 

TreeNode.NodeCustomData
TreeNode.DocumentCustomData

 

You can use these values in two ways:

 

1. You can use them as a single ntext block of text:

 

[C#]

 

TreeNode.NodeCustomData.Value = "my value";

 

 

2. You can use them as a collection of custom values that are stored as an XML document:

 

[C#]

 

TreeNode.NodeCustomData["myproperty1"] = "my value 1";

TreeNode.NodeCustomData["myproperty2"] = "my value 2";

Page url: http://devnet.kentico.com/docs/devguide/index.html?custom_document_data.htm