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
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
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 19, 2018Brass Contributor
Bob German wrote:
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!
Hi Bob,My Page is hosted in azure using ADAL to authenticate. I am able to call SPO APIs but images are not rendering.
Regarding uploading a aspx page to document(this will not work in the modern team or communication sites) as by default the page is getting downloaded instead of rendering.
Do you know anything about road map of publishing sites?. Will it be there or deprecated in future. If microsoft is keeping the publishing sites than we can use page layout approach for our customization but not sure about the publishing site roadmap
Regards,
Syed