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
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
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
- Bob GermanMar 19, 2018Former Employee
To get the aspx pages to work - try disabling NoScript https://support.office.com/en-us/article/allow-or-prevent-custom-script-1f2c515f-5d7e-448a-9fd7-835da935584f before uploading your aspx file(s). I just tried it on both a modern Communication and Team site and it worked OK.
As for the roadmap on Publishing sites - the classic sites will continue to be supported for the forseeable future. I expect modern sites to start to support more of the Publishing features as well, but there's nothing specific on the roadmap yet...
- AnonymousMay 14, 2018
Hi,
I have a similar scenario and of course similar problems.
If i resume you have two options. If you want something really specific, create a full custom website and using SharePoint Online only as a backend service hosting the data is the best solution. otherwise you must stay inside the trend imposed by SPO, customize what it was possible and create some webparts.
So i decided to create webparts and add them to my homepage (Communication site). But quickly a great interogration appeared.
How to add automatically webparts to my homepage when a create subsites (and remove all defaults) when you have a site design ? With old senario and a basic SP, we added that to a pageLayout with a custom master page or inside onet.xml. But what about now with SPO...
- Create Add-in : Not exactly what i want.
- Create SPX : Of course i will create my webparts with SharePoint Framework and push to my app catalog site. But I do not think it's possible to automatically deploy webparts inside a specific pages at this level.
- Use PowerShell with Microsoft Flow : May be a good way but i never read something about it on documentation.
- Use external PowerShell and run it : Possible but it's not the best solution because it's not 100% automatic.Otherwise I don't have ideas how to achieve this. And I have more or less the same problem if I want to create new page automatically, what is the best solution?
Best Regards,
- Mudasar SyedMar 19, 2018Brass Contributor
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