RenderPattern Element
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Provides field definition for a field that is declared in a list schema.
<RenderPattern
ControlClass = "Text"
DisplayName = "Text"
Implementation = "Caml" | "Control"
Name = "Text"
Tall = "TRUE" | "FALSE"
Type = "DataType">
</RenderPattern>
Attributes
Attribute | Description | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
ControlClass |
Optional Text. |
|||||||||||
DisplayName |
Optional Text. The displayed name of the field. |
|||||||||||
Implementation |
Optional Text. Possible values include Caml and Control. |
|||||||||||
Name |
Optional Text. The Name attribute specifies what display mode this Collaborative Application Markup Language (CAML) is used in. The following table presents possible values for this attribute, their display modes, and when they are in effect.
|
|||||||||||
Tall |
Optional Boolean. |
|||||||||||
Type |
Optional Text. Specifies a data type for the rendered pattern. Can be set to one of the following types used in FldTypes.xml: Boolean, Choice, Counter, Currency, DateTime, Integer, Lookup, Note, Number, Text, Threading, or URL. |
Child Elements
Numerous |
Parent Elements
Remarks
When the Field element is used to request the rendering of a piece of data, the rendering works as follows:
The field being rendered is determined. If rendering takes place inside a Fields or ForEach element (for example,
<ForEach Select="/Fields/Field">
enumeration), the field will be whichever one comes next in the enumeration. Otherwise, the field can be specified as<Field Name="FieldName"/>
.The data type of the field in question is determined (for example, Text, Number, Currency, and so on).
The display mode is determined, which can be one of the seven modes listed for the Name attribute in the table earlier in this topic.
FldTypes.xml is consulted for the CAML appropriate to the particular display mode and data type.
The CAML found in FldTypes.xml is rendered.
For example, assume that a Text field is being rendered in Edit mode. The section in FldTypes.xml that describes the Text type is consulted, and then the CAML contained in <RenderPattern Name="EditPattern">
is rendered.
It is not recommended, but you can edit FldTypes.xml in order to change, for example, how integer data is displayed. This will affect all Web sites based on Microsoft Windows SharePoint Services after Microsoft Internet Information Services (IIS) is restarted.
Example
The following example from FldTypes.xml defines two different rendering patterns for a Note field, depending on whether the field has rich text formatting.
<RenderPattern Name="DisplayPattern" DisplayName="DisplayPattern">
<FieldSwitch>
<Expr>
<Property Select="RichText" />
</Expr>
<Case Value="TRUE">
<Column AutoHyperLinkNoEncoding="TRUE" />
</Case>
<Default>
<Column HTMLEncode="TRUE" AutoHyperLink="TRUE"
AutoNewLine="TRUE" />
</Default>
</FieldSwitch>
</RenderPattern>