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.

DisplayBidiPattern — DISPLAYBIDI — when rendering the ViewBody section of a view for a field that supports bidirectional reading order.

DisplayPattern — DISPLAY — when rendering the ViewBody section of a view.

EditBidiPattern — EDITBIDI — when rendering an edit item form for a field that supports bidirectional reading order.

EditPattern — EDIT — when rendering an edit item form.

HeaderBidiPattern — HEADERBIDI — when rendering the ViewHeader section of a view for a field that supports bidirectional reading order.

HeaderPattern — DISPLAYHEAD — when rendering the ViewHeader section of a view.

NewBidiPattern — NEWBIDI — when rendering a new item form for a field that supports bidirectional reading order.

NewPattern — NEW — when rendering a new item form.

PreviewDisplayPattern — PREVIEWDISPLAY — when editing a display form with Microsoft FrontPage.

PreviewNewPattern — PREVIEWNEW — when editing a new item form with FrontPage.

PreviewEditPattern — PREVIEWEDIT — when editing an edit item form with FrontPage.

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

FieldType

Remarks

When the Field element is used to request the rendering of a piece of data, the rendering works as follows:

  1. 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"/>.

  2. The data type of the field in question is determined (for example, Text, Number, Currency, and so on).

  3. 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.

  4. FldTypes.xml is consulted for the CAML appropriate to the particular display mode and data type.

  5. 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>

See Also

Reference

Field Element (List)