This control displays the specified value of the currently displayed document. It's useful if you need to display e.g. the current document name on the page.
Properties
Property Name |
Description |
Sample Value |
AttributeName |
Name of the field to be displayed. |
"DocumentName" |
ClassNames |
List of document types for which the value should be displayed, separated with a semicolon (;). |
"cms.article;cms.menuitem" |
FormattingString |
.NET formatting expression for displaying the value. |
"Name: {0}" |
You can place this control into web parts, ASPX page templates or layouts.
Example
You only need to add the following code inside your ASPX page or web part:
[C#], [VB.NET]
<cc1:CMSDocumentValue ID="docVal" runat="server" AttributeName="DocumentName" FormattingString="Document name: {0}" /> |
Page url: http://devnet.kentico.com/docs/controls/index.html?cmsdocumentvalue.htm