No Master Pages!
You will be shocked like me when you hear:
“No custom master pages!” for your SharePoint project.
Yes! It is the case
In the real-world scenarios with high-quality standards, master pages are not recommended.
Reason
In the case of SharePoint Online, Microsoft will be pushing updates to existing master pages.
So in this case, if you are using custom master pages, you won't get the new updates. This will make your page act isolated from the rest.
Thus the recommended approach is to use existing master pages in SharePoint Online. You can use JavaScript Injection to update the page sections for branding or common behavior.
SharePoint On-Premise
Note that the preceding practice is recommended for SharePoint On-Premise too. The reason is that, in the future if the SharePoint solution is migrated to SharePoint Online, fewer code changes will be required.
If we were using custom master pages, then during the upgrade time we need to remove the custom master pages and create a JavaScript injection pattern. This will be an additional cost in the future.
Note
You can find more on the Patterns recommended for SharePoint Online using the reference link.
Replacing Master Pages
Master Pages are replaced with the combination of the following:
- Use Composed Looks for managing themes.
- Use JavaScript Injection to update UI sections,
To summarize, master pages can be replaced as in the following:
This also aligns with the Client-side rendering strategy.
References
Summary
In this article we explored why no master pages. Although the pattern is recommended for SharePoint Online, this has been adapted to SharePoint On-Premise solutions as well.