Example 7 - Adding an in-line, highly customized view
To add an in-line, highly customized view for a list:
Using Microsoft FrontPage, create a new page in a Web site based on SharePoint Team Services from Microsoft.
In HTML View, add the following <META> tag in the document's HEAD section:
<META Name="Microsoft SharePoint Content Type" Content="Dynamic">
Within the document's BODY section, add the following CAML source:
<ows:XML> <SetList>Announcements</SetList> <View> <ViewFields> <FieldRef Name="LinkTitle" Explicit="TRUE"/> <FieldRef Name="Expires"/> <FieldRef Name="Body"/> </ViewFields> <ViewBody> <HTML><![CDATA[<h1>]]></HTML> <Field Name="LinkTitle"/> <HTML><![CDATA[</h1><ol>]]></HTML> <Fields> <HTML><![CDATA[<li>]]></HTML> <Field/> <HTML><![CDATA[</li>]]></HTML> </Fields> <HTML><![CDATA[</ol><hr>]]></HTML> </ViewBody> </View> </ows:XML>
Save and view the page.
As a result, a new view of the announcements list is created. The LinkTitle field is specially handled in that it is displayed via an <H1> tag. All the other view fields are handled as list items inside an ordered list. A horizontal rule separates one list record from the next.
Note This example assumes that the built-in Announcements list has not been deleted.