Adding XsltListViewWebPart to a Homepage (landing-page) in Site Definition and Setting the Web Part Display Properties

Read It

Have you ever tried add a XsltListViewWebPart to display a list view (e.g. “My Project Tasks” or “My Issues”) to the default landing page of your site and unable to change the title of the webpart, frame type etc. as the code differs from that of a standard web part?

You may have tried this by declaratively copying the XML from an existing page after a customization but still no luck.

Let’s Fix

The following declaration shows how you can use the “ListViewWebPart” to accomplish this (I presume, most of you’ll familiar with the view declaration):

<View List="$Resources:BflResource,ldiv_lists_Folder;/$Resources:BflResource,ldiv_projectTask_Folder;" MobileView="TRUE" MobileDefaultView="TRUE" Type="HTML" Url="$Resources:BflResource,ldiv_lists_Folder;/$Resources:BflResource,ldiv_projectTask_Folder;/MyItems.aspx" BaseViewID="2" ImageUrl="/_layouts/images/issuelst.png" WebPartZoneID="Right" WebPartOrder="1">
          <XslLink Default="TRUE">main.xsl</XslLink>
          <RowLimit Paged="TRUE">15</RowLimit>
          <Toolbar Type="Standard" />
            <FieldRef Name="LinkTitle" />
            <FieldRef Name="StartDate" />
            <FieldRef Name="DueDate" />
            <FieldRef Name="PercentComplete" />
            <FieldRef Name="Status" />
            <FieldRef Name="Priority" />
            <FieldRef Name="Predecessors" />
                <FieldRef Name="AssignedTo" />
                <Value Type="Integer">
                  <UserID />
              <FieldRef Name="Status" />
              <FieldRef Name="Priority" />
        <WebPart xmlns=""&gt;
          <Assembly>Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c


Related references:

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.