Question

I have worked on many sharepoint 2013 & 2016 on-premises sites. where i usually do the following modifications to the site collection master pages, as a first task:-

1- I move the site logo to be on the upper left hand side of the page.

2- I move the default search field to be on the upper right hand side of the page + i add the current date and time using javascript.

3- i also add bread crumb navigation, by adding this markup to the master pages:-

<asp:ContentPlaceHolder id="customBreadcrumb" runat="server">
    <asp:SiteMapPath runat="server" SiteMapProvider="SPContentMapProvider" RenderCurrentNodeAsLink="false" NodeStyle-CssClass="breadcrumbNode" CurrentNodeStyle-CssClass="breadcrumbCurrentNode" RootNodeStyle-CssClass="breadcrumbRootNode" HideInteriorRootNodes="true" SkipLinkText=""/>
</asp:ContentPlaceHolder>

now i follow this appraoch:-

  1. i create a copy of the seatle.master master page.
  2. then i do the modifications on the new master page.
  3. then i set the new master page as the custom & default master page for the site collections.

now i am starting a new sharepoint online project. and i have read many articles that modifying master page on sharepoint online should be avoided here is a Link, mainly for these main reasons:-

  1. Microsoft might update sharepoint online sites, so our custom master page might break.
  2. also if we create our own custom master pages, then any new features Microsoft apply will only be delivered to the built-in master page. so if we create a custom master page, then we might loose new features (i mean the UI for these new features will not be available to us).
  3. seems that defining a custom master page will not be applied on the modern list layout and it will only be applied to the classic mode. this is the major limitation for having custom master pages inside SP online i think.

so let say our customer asked us to do the above modifications inside SP online which are (move logo, move search box, add current time and date + add breadcrumb navigation). so should we mention to them that SP online does not support or does not recommend these types of modifications ? or we can implement some of them in a supported way?

Thanks

Était-ce utile?

La solution

No dont touch the masterpage. SharePoint allows you to create a custom masterpage but this is under the premise that you fully understand things will break if you use the default masterpage. If you use a custom masterpage and your happy that you know your going to lag behind releases as microsoft pumps out constant updates.

I personally dont recommend it and microsoft does advice not to do it. All that you mentioned is done via CSS:

Although it's possible to create custom master pages and other structural elements as part of a custom branding project, the long-term cost of supporting custom master pages and other custom structural elements is high. Custom branding can make it more costly for your organization to apply upgrades and provide ongoing support.

https://docs.microsoft.com/en-us/sharepoint/dev/solution-guidance/sharepoint-site-branding-and-page-customization-solutions

cog -> site settings -> under "Look and Feel" click "master page". -> click on "Alternate CSS URL" -> select "Specify a CSS file to be used by this site and all sites that inherit from it:" and chose a custom CSS file that you saved in SharePoint library.

you would be surprised what you could do in CSS.

as for Breadcrumb you can do this:

https://www.phidiax.com/blog/post/SharePoint-Online-Document-List-Navigation-Breadcrumbs-Using-JavaScript-Display-Template

or use this:

http://sharepoint.handsontek.net/2017/02/12/create-a-modern-breadcrumb-navigation-on-sharepoint/

or create your own ;)

Licencié sous: CC-BY-SA avec attribution
Non affilié à sharepoint.stackexchange
scroll top