Forum Discussion
SharePoint Online Custom Master Page
- Mar 07, 2018
You definately could use Visual Studio to create a custom Master Page so that you can utilize version control / source control. You should however consider your approach to branding carefully. In general custom Master Pages should be avoided...
Please read about the latest guidance in the articles below:
https://docs.microsoft.com/en-us/sharepoint/dev/solution-guidance/portal-branding
https://docs.microsoft.com/en-us/sharepoint/dev/solution-guidance/branding-and-site-provisioning-solutions-for-sharepoint
Have you considered making use of Communication Sites in SharePoint Online? These type of sites are generally considerd to be the successor to traditional Publishing Sites
Agree with Juan Carlos' suggestions. Furthermore, for full and unlimited branding options you could even consider building and hosting a full custom website (in ASP.NET and Azure for example) and using SharePoint Online only as a backend service hosting the data.
Hi,
I have a similar scenario. Building the azure or .net websites make sense but but it has an issue with the images. Image download from sp online onto azure is an issue..
Regards,
Syed
- Bob GermanMar 19, 2018Copper Contributor
Interesting Mudsar, I didn't try it with an external page accessing images in SP. I can imagine that's an issue because the image can't do the authentication flow (even though it's transparent assuming your page is Azure AD authenticated), which requires a form post at one point, so it won't work for anything but a web page.
That shouldn't be issue if you ran your SPA on an empty SharePoint page in a document library; https://github.com/Widget-Wrangler/ww/blob/master/Provisioning.MicroSurvey/MicroSurvey/SurveyApp/Default.aspx with a Settings page on it. Almost anything can go in the PlaceHolderMain element, including a full SPA. The advantage here is that you're running in SharePoint so you'll have the necessary FedAuth token.
ALSO http://www.bostonmusicdave.com/starting-a-new-intranet-decide-between-classic-sharepoint-and-modern-communication-sites/.
SharePoint is in a time of transition, making these decisions more complex. I wanted to add an external SPA as another option for you to consider, but that's certainly more work... lots of tradeoffs!
- Mudasar SyedMar 19, 2018Brass Contributor
Bob,
Dint get this statement "so it won't work for anything but a web page." If i create a .aspx page instead of .html page are there chances of image working?
Regards,
Syed
- Bob GermanMar 19, 2018Copper Contributor
My theory is that if you run it from a page in SharePoint, as opposed to another site somewhere, it will start working because it will have access to the FedAuth cookie that SharePoint uses when you log in. You can also use the SharePoint REST API freely without the need for more authentication (though you need to deal with the "forms digest" when doing anything other than a GET request). Where is your page hosted now?
The reason I mentioned an .aspx page is that it turns out that if you put an .aspx page in a SharePoint doc lib, it will render. You can't put any code behind but you can use built-in SharePoint web controls and any HTML and JavaScript you wish. The sample I sent adds the web controls for SharePoint's navigation etc. in case you wanted to bring that onto the page with your SPA.Does that help?
Thanks!
- Mudasar SyedMar 18, 2018Brass Contributor
If we decide to use spfx widget for customization. Can we write a full page spfx app? hiding the quick launch?
Regards,
Syed
- Bob GermanMar 19, 2018Copper Contributor
There is no way to do this with SPFx right now; add your vote to https://sharepoint.uservoice.com/forums/329220-sharepoint-dev-platform/suggestions/15745306-add-support-for-single-page-applications-to-the-sh if you'd like to see that added! Meanwhile you can always use a non-SPFx widget with SPFx type tooling (see http://julieturner.net/2018/01/conquer-your-dev-toolchain-in-classic-sharepoint-part-1/) and host it on an .aspx page in a document library. If you're careful it will port easily to SPFx!