Thursday, February 09, 2006
Change the fields in the current view of a listviewwebpart
Something which is pretty handy to know, ... The AllUserswebpart section in ONET.XML defines which webparts are added to a site at site creation. For every list that is created on a site, you can easily add a listviewwebpart by adding <View List="104" BaseViewID="0" WebPartZoneID="Left"/> to the AllUsersWebPart section. The value for the List property references the ListTemplate element in the ListTemplates section - 104 is the ID for the Announcements list. The webpart on default.aspx uses the current view as defined in SCHEMA.XML with BaseViewID=0. If you want to change which fields are displayed in this view, you need to alter the ViewFields section in SCHEMA.XML.