Office365 (SharePoint Online) Website Custom Branding – Using Custom Master Page

When subscribing to a Microsoft Office 365 P1 plan the website that gets created for public facing does not directly allow custom branding. For this plan Microsoft does not enable publishing feature as well.

The master pages found in the masterpage library are not used for the public website. The default master page is called root.master and can be placed in the root of SharePoint. Click ‘All Files’ in Sharepoint Designer 2010 to see the file hierarchy of SharePoint and you will find the Root.master at the bottom of this listing.

We cannot modify root.Master, instead a new master page could be uploaded and set as default master page.

You could try the following to test this out:

1. Use a starter master page found at: http://startermasterpages.codeplex.com/

2. Use SPD to upload the new master to “_catalogs/masterpage”. Then right click the new master page you just uploaded and “Set as Default Master Page”. Then inside each of the pages “pages (web Pages)” you will need to edit the “MasterPageFile="~site/root.master"” to be something like “MasterPageFile="~site/_catalogs/masterpage/myCustomMasterPage.master"”. This will allow your site to use the new master page.

Note:

One additional thing is you will need to add the content placeholder office 365 pages use. It’s not the same as the standard SharePoint master page content place holder.

Add the following to just above or below the SharePoint content place holder (PlaceHolderMain) in your new master page:

<div id="IWS_WH_Elem_Content" class="MSC_Body">
<asp:ContentPlaceHolder ID="IWS_WH_CPH_Content" runat="server"></asp:ContentPlaceHolder>
</div>

 

A site like below could be easily created on a P1 plan:

image

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" />
         <ViewFields>
            <FieldRef Name="LinkTitle" />
            <FieldRef Name="StartDate" />
            <FieldRef Name="DueDate" />
            <FieldRef Name="PercentComplete" />
            <FieldRef Name="Status" />
            <FieldRef Name="Priority" />
            <FieldRef Name="Predecessors" />
          </ViewFields>
          <Query>
            <Where>
              <Eq>
                <FieldRef Name="AssignedTo" />
                <Value Type="Integer">
                  <UserID />
                </Value>
              </Eq>
            </Where>
            <OrderBy>
              <FieldRef Name="Status" />
              <FieldRef Name="Priority" />
            </OrderBy>
          </Query>
        <![CDATA[
        <WebPart xmlns="http://schemas.microsoft.com/WebPart/v2"&gt;
          <Assembly>Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c
          </Assembly>        
       <TypeName>Microsoft.SharePoint.WebPartPages.ListViewWebPart</TypeName>
          <Title>$Resources:core,My_Tasks;</Title>        
          <FrameState>Normal</FrameState>
          <AllowRemove>true</AllowRemove>
          <AllowZoneChange>true</AllowZoneChange>
          <AllowMinimize>true</AllowMinimize>
          <AllowConnect>true</AllowConnect>
          <AllowEdit>true</AllowEdit>
          <AllowHide>true</AllowHide>
          <IsVisible>true</IsVisible>
          <MissingAssembly>$Resources:core,ImportErrorMessage;</MissingAssembly>
        </WebPart>
        ]]>
      </View>

Finally

Related references:

http://stackoverflow.com/questions/4156014/add-an-xsltlistviewwebpart-to-a-site-defintion-homepage
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webpartpages.xsltlistviewwebpart.aspx
http://stefan-stanev-sharepoint-blog.blogspot.com/2010/06/sharepoint-2010-binaryserializedwebpart.html