SOLVED

SharePoint Online Custom Master Page

%3CLINGO-SUB%20id%3D%22lingo-sub-168659%22%20slang%3D%22en-US%22%3ESharePoint%20Online%20Custom%20Master%20Page%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-168659%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20there%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20have%20to%20create%20SharePoint%20Online%20publishing%20site%20with%20lot%20of%20branding%20like%20dashboard.%20I%20read%20few%20articles%20but%20couldn't%20find%20proper%20way%20to%20start%20with.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFirst%20I%20want%20to%20customize%20master%20page%2C%20I%20know%20we%20can%20do%20using%20design%20manager%20%26amp%3B%20SharePoint%20designer%20but%20can%20I%20do%20using%20Visual%20studio%20so%20that%20I%20can%20utilize%20version%20control%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAny%20link%26nbsp%3B%20or%20sample%20would%20be%20appreciated.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-193229%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%20Online%20Custom%20Master%20Page%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-193229%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI%20have%20a%20similar%20scenario%20and%20of%20course%20similar%20problems.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20i%20resume%20you%20have%20two%20options.%20If%20you%20want%20something%20really%20specific%2C%20create%20a%20full%20custom%20website%20and%20using%20SharePoint%20Online%20only%20as%20a%20backend%20service%20hosting%20the%20data%20is%20the%20best%20solution.%20otherwise%20you%20must%20stay%20inside%20the%20trend%20imposed%20by%20SPO%2C%20customize%20what%20it%20was%20possible%20and%20create%20some%20webparts.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20i%20decided%20to%20create%20webparts%20and%20add%20them%20to%20my%20homepage%20(Communication%20site).%20But%20quickly%20a%20great%20interogration%20appeared.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHow%20to%20add%20automatically%20webparts%20to%20my%20homepage%20when%20a%20create%20subsites%20(and%20remove%20all%20defaults)%20when%20you%20have%20a%20site%20design%20%3F%20With%20old%20senario%20and%20a%20basic%20SP%2C%20we%20added%20that%20to%20a%20pageLayout%20with%20a%20custom%20master%20page%20or%20inside%20onet.xml.%20But%20what%20about%20now%20with%20SPO...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E-%20Create%20Add-in%20%3A%20Not%20exactly%20what%20i%20want.%3CBR%20%2F%3E-%20Create%20SPX%20%3A%20Of%20course%20i%20will%20create%20my%20webparts%20with%20SharePoint%20Framework%20and%20push%20to%20my%20app%20catalog%20site.%20But%20I%20do%20not%20think%20it's%20possible%20to%20automatically%20deploy%20webparts%20inside%20a%20specific%20pages%20at%20this%20level.%3CBR%20%2F%3E-%20Use%20PowerShell%20with%20Microsoft%20Flow%20%3A%20May%20be%20a%20good%20way%20but%20i%20never%20read%20something%20about%20it%20on%20documentation.%3CBR%20%2F%3E-%20Use%20external%20PowerShell%20and%20run%20it%20%3A%20Possible%20but%20it's%20not%20the%20best%20solution%20because%20it's%20not%20100%25%20automatic.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOtherwise%20I%20don't%20have%20ideas%20how%20to%20achieve%20this.%20And%20I%20have%20more%20or%20less%20the%20same%20problem%20if%20I%20want%20to%20create%20new%20page%20automatically%2C%20what%20is%20the%20best%20solution%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBest%20Regards%2C%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-173359%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%20Online%20Custom%20Master%20Page%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-173359%22%20slang%3D%22en-US%22%3E%3CP%3ETo%20get%20the%20aspx%20pages%20to%20work%20-%20try%20disabling%20NoScript%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fsupport.office.com%2Fen-us%2Farticle%2Fallow-or-prevent-custom-script-1f2c515f-5d7e-448a-9fd7-835da935584f%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsupport.office.com%2Fen-us%2Farticle%2Fallow-or-prevent-custom-script-1f2c515f-5d7e-448a-9fd7-835da935584f%3C%2FA%3E%20before%20uploading%20your%20aspx%20file(s).%20I%20just%20tried%20it%20on%20both%20a%20modern%20Communication%20and%20Team%20site%20and%20it%20worked%20OK.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAs%20for%20the%20roadmap%20on%20Publishing%20sites%20-%20the%20classic%20sites%20will%20continue%20to%20be%20supported%20for%20the%20forseeable%20future.%20I%20expect%20modern%20sites%20to%20start%20to%20support%20more%20of%20the%20Publishing%20features%20as%20well%2C%26nbsp%3B%26nbsp%3Bbut%20there's%20nothing%26nbsp%3Bspecific%20on%20the%20roadmap%20yet...%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-173249%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%20Online%20Custom%20Master%20Page%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-173249%22%20slang%3D%22en-US%22%3E%3CBLOCKQUOTE%3E%3CHR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F382%22%20target%3D%22_blank%22%3E%40Bob%20German%3C%2FA%3E%20wrote%3A%3CBR%20%2F%3E%3CP%3EMy%20theory%20is%20that%20if%20you%20run%20it%20from%20a%20page%20in%20SharePoint%2C%20as%20opposed%20to%20another%20site%20somewhere%2C%20it%20will%20start%20working%20because%20it%20will%20have%20access%20to%20the%20FedAuth%20cookie%20that%20SharePoint%20uses%20when%20you%20log%20in.%26nbsp%3B%20You%20can%20also%20use%20the%20SharePoint%20REST%20API%20freely%20without%20the%20need%20for%20more%20authentication%20(though%20you%20need%20to%20deal%20with%20the%20%22forms%20digest%22%20when%20doing%20anything%20other%20than%20a%20GET%20request).%20Where%20is%20your%20page%20hosted%20now%3F%3CBR%20%2F%3E%3CBR%20%2F%3EThe%20reason%20I%20mentioned%20an%20.aspx%20page%20is%20that%20it%20turns%20out%20that%20if%20you%20put%20an%20.aspx%20page%20in%20a%20SharePoint%20doc%20lib%2C%20it%20will%20render.%20You%20can't%20put%20any%20code%20behind%20but%20you%20can%20use%20built-in%20SharePoint%20web%20controls%20and%20any%20HTML%20and%20JavaScript%20you%20wish.%26nbsp%3BThe%20sample%20I%20sent%20adds%20the%20web%20controls%20for%20SharePoint's%20navigation%20etc.%20in%20case%20you%20wanted%20to%20bring%20that%20onto%20the%20page%20with%20your%20SPA.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EDoes%20that%20help%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks!%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CHR%20%2F%3E%3C%2FBLOCKQUOTE%3E%0A%3CP%3E%3CBR%20%2F%3EHi%20Bob%2C%3C%2FP%3E%0A%3CP%3EMy%20Page%20is%20hosted%20in%20azure%20using%20ADAL%20to%20authenticate.%20I%20am%20able%20to%20call%20SPO%20APIs%20but%20images%20are%20not%20rendering.%3C%2FP%3E%0A%3CP%3ERegarding%20uploading%20a%20aspx%20page%20to%20document(this%20will%20not%20work%20in%20the%20modern%20team%20or%20communication%20sites)%20as%20by%20default%20the%20page%20is%20getting%20downloaded%20instead%20of%20rendering.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EDo%20you%20know%20anything%20about%20road%20map%20of%20publishing%20sites%3F.%20Will%20it%20be%20there%20or%20deprecated%20in%20future.%20If%20microsoft%20is%20keeping%20the%20publishing%20sites%20than%20we%20can%20use%20page%20layout%20approach%20for%20our%20customization%20but%20not%20sure%20about%20the%20publishing%20site%20roadmap%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ERegards%2C%3C%2FP%3E%0A%3CP%3ESyed%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-173248%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%20Online%20Custom%20Master%20Page%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-173248%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Bob%2C%3C%2FP%3E%0A%3CP%3EMy%20Page%20is%20hosted%20in%20azure%20using%20ADAL%20to%20authenticate.%20I%20am%20able%20to%20call%20SPO%20APIs%20but%20images%20are%20not%20rendering.%3C%2FP%3E%0A%3CP%3ERegarding%20uploading%20a%20aspx%20page%20to%20document(this%20will%20not%20work%20in%20the%20modern%20team%20or%20communication%20sites)%20as%20by%20default%20the%20page%20is%20getting%20downloaded%20instead%20of%20rendering.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EDo%20you%20know%20anything%20about%20road%20map%20of%20publishing%20sites%3F.%20Will%20it%20be%20there%20or%20deprecated%20in%20future.%20If%20microsoft%20is%20keeping%20the%20publishing%20sites%20than%20we%20can%20use%20page%20layout%20approach%20for%20our%20customization%20but%20not%20sure%20about%20the%20publishing%20site%20roadmap%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ERegards%2C%3C%2FP%3E%0A%3CP%3ESyed%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-173159%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%20Online%20Custom%20Master%20Page%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-173159%22%20slang%3D%22en-US%22%3E%3CP%3EMy%20theory%20is%20that%20if%20you%20run%20it%20from%20a%20page%20in%20SharePoint%2C%20as%20opposed%20to%20another%20site%20somewhere%2C%20it%20will%20start%20working%20because%20it%20will%20have%20access%20to%20the%20FedAuth%20cookie%20that%20SharePoint%20uses%20when%20you%20log%20in.%26nbsp%3B%20You%20can%20also%20use%20the%20SharePoint%20REST%20API%20freely%20without%20the%20need%20for%20more%20authentication%20(though%20you%20need%20to%20deal%20with%20the%20%22forms%20digest%22%20when%20doing%20anything%20other%20than%20a%20GET%20request).%20Where%20is%20your%20page%20hosted%20now%3F%3CBR%20%2F%3E%3CBR%20%2F%3EThe%20reason%20I%20mentioned%20an%20.aspx%20page%20is%20that%20it%20turns%20out%20that%20if%20you%20put%20an%20.aspx%20page%20in%20a%20SharePoint%20doc%20lib%2C%20it%20will%20render.%20You%20can't%20put%20any%20code%20behind%20but%20you%20can%20use%20built-in%20SharePoint%20web%20controls%20and%20any%20HTML%20and%20JavaScript%20you%20wish.%26nbsp%3BThe%20sample%20I%20sent%20adds%20the%20web%20controls%20for%20SharePoint's%20navigation%20etc.%20in%20case%20you%20wanted%20to%20bring%20that%20onto%20the%20page%20with%20your%20SPA.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EDoes%20that%20help%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks!%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-173083%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%20Online%20Custom%20Master%20Page%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-173083%22%20slang%3D%22en-US%22%3E%3CP%3EBob%2C%3C%2FP%3E%0A%3CP%3EDint%20get%20this%20statement%20%22%3CSPAN%3Eso%20it%20won't%20work%20for%20anything%20but%20a%20web%20page.%3C%2FSPAN%3E%22%20If%20i%20create%20a%20.aspx%20page%20instead%20of%20.html%20page%20are%20there%20chances%20of%20image%20working%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ERegards%2C%3C%2FP%3E%0A%3CP%3ESyed%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-173026%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%20Online%20Custom%20Master%20Page%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-173026%22%20slang%3D%22en-US%22%3E%3CP%3EThere%20is%20no%20way%20to%20do%20this%20with%20SPFx%20right%20now%3B%20add%20your%20vote%20to%20%3CA%20href%3D%22https%3A%2F%2Fsharepoint.uservoice.com%2Fforums%2F329220-sharepoint-dev-platform%2Fsuggestions%2F15745306-add-support-for-single-page-applications-to-the-sh%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ethis%20UserVoice%3C%2FA%3E%20if%20you'd%20like%20to%20see%20that%20added!%20Meanwhile%20you%20can%20always%20use%20a%20non-SPFx%20widget%20with%20SPFx%20type%20tooling%20(see%20%3CA%20href%3D%22http%3A%2F%2Fjulieturner.net%2F2018%2F01%2Fconquer-your-dev-toolchain-in-classic-sharepoint-part-1%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EJulie%20Turner's%20blog%20article%3C%2FA%3E)%20and%20host%20it%20on%20an%20.aspx%20page%20in%20a%20document%20library.%20If%20you're%20careful%20it%20will%20port%20easily%20to%20SPFx!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-173024%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%20Online%20Custom%20Master%20Page%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-173024%22%20slang%3D%22en-US%22%3E%3CP%3EInteresting%20Mudsar%2C%20I%20didn't%20try%20it%20with%20an%20external%20page%20accessing%20images%20in%20SP.%20I%20can%20imagine%20that's%20an%20issue%20because%20the%20image%20can't%20do%20the%20authentication%20flow%20(even%20though%20it's%20transparent%20assuming%20your%20page%20is%20Azure%20AD%20authenticated)%2C%20which%20requires%20a%20form%20post%20at%20one%20point%2C%20so%20it%20won't%20work%20for%20anything%20but%20a%20web%20page.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThat%26nbsp%3Bshouldn't%20be%26nbsp%3Bissue%20if%20you%20ran%26nbsp%3Byour%20SPA%20on%20an%20empty%20SharePoint%20page%20in%20a%20document%20library%3B%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FWidget-Wrangler%2Fww%2Fblob%2Fmaster%2FProvisioning.MicroSurvey%2FMicroSurvey%2FSurveyApp%2FDefault.aspx%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehere%20is%20an%20example%3C%2FA%3E%20with%20a%20Settings%20page%20on%20it.%20Almost%20anything%20can%20go%20in%20the%26nbsp%3B%3CSPAN%3EPlaceHolderMain%20element%2C%20including%20a%20full%20SPA.%20The%20advantage%20here%20is%20that%20you're%20running%20in%20SharePoint%20so%20you'll%20have%20the%20necessary%20FedAuth%20token.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EALSO%26nbsp%3B%3CA%20href%3D%22http%3A%2F%2Fwww.bostonmusicdave.com%2Fstarting-a-new-intranet-decide-between-classic-sharepoint-and-modern-communication-sites%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EHere's%20a%20good%20article%20with%20pros%2Fcons%20on%20using%20classic%20sites%20with%20master%20page%20branding%20vs.%20modern%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESharePoint%20is%20in%20a%20time%20of%20transition%2C%20making%20these%20decisions%20more%20complex.%20I%20wanted%20to%20add%20an%20external%20SPA%20as%20another%20option%20for%20you%20to%20consider%2C%20but%20that's%20certainly%20more%20work...%20lots%20of%20tradeoffs!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-172974%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%20Online%20Custom%20Master%20Page%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-172974%22%20slang%3D%22en-US%22%3E%3CP%3EIf%20we%20decide%20to%20use%20spfx%20widget%20for%20customization.%20Can%20we%20write%20a%20full%20page%20spfx%20app%3F%20hiding%20the%20quick%20launch%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ERegards%2C%3C%2FP%3E%0A%3CP%3ESyed%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-172973%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%20Online%20Custom%20Master%20Page%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-172973%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%0A%3CP%3EI%20have%20a%20similar%20scenario.%20Building%20the%20azure%20or%20.net%20websites%20make%20sense%20but%20but%20it%20has%20an%20issue%20with%20the%20images.%20Image%20download%20from%20sp%20online%20onto%20azure%20is%20an%20issue..%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ERegards%2C%3C%2FP%3E%0A%3CP%3ESyed%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-170545%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%20Online%20Custom%20Master%20Page%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-170545%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F125684%22%20target%3D%22_blank%22%3E%40Shital%20Patel%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20answer%20your%20question%2C%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fblogs.msdn.microsoft.com%2Fbobgerman%2F2011%2F01%2F31%2Fpackaging-master-pages-and-page-layouts-with-visual-studio-2010%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehere%20is%20an%20article%3C%2FA%3E%20I%20wrote%20a%20long%20time%20ago%20on%20how%20to%20package%20master%20pages%20and%20page%20layouts%20with%20Visual%20Studio.%20However%20notice%20the%20date%20-%20this%20article%20was%20hot%207%20years%20ago.%20To%20give%20some%20perspective%20-%20Windows%207%20had%20recently%20come%20out%2C%20and%20iPhone%20had%20not%20even%20been%20announced%20when%20this%20was%20written!%20Just%20think%20how%20much%20the%20technology%20world%20has%20changed%20since%20then.%20Nobody%20cared%20about%20making%20web%20sites%20mobile-ready%2C%20for%20example%2C%20since%20there%20were%20no%20devices%20worth%20surfing%20the%20web%20on!%20So%20I'm%20going%20to%20pile%20on%20with%20everybody%20else%20and%20try%20to%20persuade%20you%20to%20take%20a%20more%20modern%20approach%2C%20much%20as%20I%20would%20tell%20a%20friend%20not%20to%20build%20a%20home%20on%20an%20eroding%20beach.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHaving%20a%20custom%20master%20page%20has%20a%20couple%20of%20side-effects%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EIt%20locks%20you%20forever%20into%20%22classic%22%20SharePoint.%20Page%20sizes%20are%20bigger%2C%20performance%20is%20slower.%20Even%20if%20you%20invest%20in%20making%20your%20page%20responsive%2C%20none%20of%20the%20classic%20web%20parts%20are%20responsive%2C%20so%20your%20mobile%20experience%20won't%20be%20very%20good%20unless%20you%20write%20all%20custom%20web%20parts.%26nbsp%3BNone%20of%20the%20cool%26nbsp%3Bmodern%20web%20parts%20work%20in%20classic%20mode%20(however%20as%20another%20commenter%20replied%2C%20you%20could%20write%20your%20own%20in%20SPFx%20and%20they'd%20work%20across%20classic%20and%20modern%20sites).%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLI%3E%0A%3CLI%3EIt's%20an%20ongoing%20%22tax%22.%20Microsoft%20sometimes%20changes%20the%20master%20pages%20to%20fix%20bugs%20or%20introduce%20new%20O365%20features.%20If%20you%20use%20your%20own%20master%20page%2C%20you%20need%20to%20take%20responsibility%20for%20checking%20to%20see%20if%20Microsoft%20has%20changed%20their%20master%20page%2C%20and%20then%20merge%20the%20changes%20in%20with%20yours.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EIndeed%2C%20script%20injection%20(as%20I%20did%20in%20%3CA%20href%3D%22https%3A%2F%2Fblogs.msdn.microsoft.com%2Fbobgerman%2F2018%2F03%2F11%2Fbuilding-headers-and-footers-that-work-on-classic-and-modern-sites%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ethis%20article%20here%3C%2FA%3E)%20is%20a%20reasonable%20path%2C%20but%20you%20may%20find%20it%20difficult%20to%20do%20the%20level%20of%20branding%20you%20require%2C%20and%20script%20injection%20creates%20potentially%20brittle%20dependencies%20on%20certain%20HTML%20elements%20being%20present.%20If%20you%20hide%20an%20element%20that%20contains%20the%20O365%20suite%20bar%20and%20then%20Microsoft%20changes%20its%20element%20ID%2C%20your%20code%20won't%20work%20anymore.%20Since%20you'd%20be%20essentially%20taking%20a%20dependency%20on%20product%20internals%2C%20there%20would%20be%20no%20warning%20as%20there%20would%20be%20with%20an%20API%20or%20feature%20change.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20have%20yet%20another%20option%20for%20you%20to%20consider%3A%20Write%20a%20web%20site%20outside%20of%20SharePoint%2C%20and%20pull%20the%20content%20into%20it%20using%20the%20API.%20This%20gives%20you%20complete%20control%2C%20and%20you%20can%20still%20use%20the%20CMS%20features%20of%20SharePoint.%20If%20you%20secure%20your%20page%20with%20Azure%20AD%2C%20you'll%20enjoy%20single%20sign-on%20with%20O365%2C%20and%20can%20use%20delegated%20permissions%20to%20act%20on%20the%20end%20user's%20behalf%20without%20ever%20touching%20a%20username%20or%20password.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWIth%20this%20approach%20authoring%2C%20document%20uploading%2C%20security%2C%20etc.%20could%20all%20be%20set%20in%20(unbranded)%20SharePoint%2C%20and%20your%20web%20site%20could%20reach%20in%20on%20the%20user's%20behalf%20and%20pull%20out%20the%20content%20and%20present%20it%20any%20way%20you%20want.%20Thus%20your%20coding%20effort%20is%20only%20on%20the%20UI%2C%20not%20authoring%20and%20administration.%20This%20is%20fully%20supported%20and%20completely%20immune%20to%20UI%20changes%20from%20Microsoft.%20Some%203rd%20party%20%22Intranet%20in%20a%20Box%22%20vendors%20have%20taken%20this%20approach.%20The%20downside%20is%20that%20you%20lose%20the%20ability%20to%20bring%20in%20web%20parts%20from%20SharePoint%20or%203rd%20parties%2C%20but%20maybe%20that's%20not%20so%20important%20if%20you%20want%20pixel-perfect%20control%20over%20the%20user%20experience.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks%20and%20best%20of%20luck%20to%20you!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-170403%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%20Online%20Custom%20Master%20Page%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-170403%22%20slang%3D%22en-US%22%3E%3CP%3EUsers%20expect%20the%20App%20Launcher%20to%20be%20present%2C%20i%20would%20not%20recommend%20trying%20to%20hide%20it%20or%20anything%20on%20the%20Office%20Suite%20Bar.%20You%20cannot%20anticipate%20what%20a%20user%20wants%20to%20do%20next%20and%20trying%20to%20force%20them%20to%20go%20on%20a%20specific%20path%20will%20be%20huge%20waste%20of%20time%20and%20effort.%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20recommend%20thinking%20about%20this%20a%20little%20differently.%20Office%20365%20is%20a%20huge%20set%20of%20apps%20that%20is%20constantly%20changing%2C%20your%20app%2Fintranet%20is%20going%20to%20be%20just%20one%20more%20of%20those%20apps.%20You%20will%20be%20more%20successful%20if%20you%20design%20your%20content%20to%20work%20within%20the%20Office%20365%20suite%20provided%20by%20MS%20than%20if%20you%20try%20to%20replace%20what%20is%20already%20there.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-170398%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%20Online%20Custom%20Master%20Page%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-170398%22%20slang%3D%22en-US%22%3E%3CP%3ESome%20of%20the%20ideas%20demonstrated%20by%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F101761%22%20target%3D%22_blank%22%3E%40Bob%20German%3C%2FA%3E%26nbsp%3Bshould%20be%20helpful%2C%20see%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fblogs.msdn.microsoft.com%2Fbobgerman%2F2018%2F03%2F11%2Fbuilding-headers-and-footers-that-work-on-classic-and-modern-sites%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fblogs.msdn.microsoft.com%2Fbobgerman%2F2018%2F03%2F11%2Fbuilding-headers-and-footers-that-work-on-classic-and-modern-sites%2F%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-170370%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%20Online%20Custom%20Master%20Page%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-170370%22%20slang%3D%22en-US%22%3E%3CP%3EThank%20you%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1803%22%20target%3D%22_blank%22%3E%40Paul%20Pascha%3C%2FA%3E%20and%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F60%22%20target%3D%22_blank%22%3E%40Juan%20Carlos%20Gonz%C3%A1lez%20Mart%C3%ADn%3C%2FA%3E%20for%20the%20answers.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-170364%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%20Online%20Custom%20Master%20Page%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-170364%22%20slang%3D%22en-US%22%3E%3CP%3EAgree%20with%20Juan%20Carlos'%20suggestions.%20Furthermore%2C%20for%20full%20and%20unlimited%20branding%20options%20you%20could%20even%20consider%20building%20and%20hosting%20a%20full%20custom%20website%20(in%20ASP.NET%20and%20Azure%20for%20example)%20and%20using%20SharePoint%20Online%20only%20as%20a%20backend%20service%20hosting%20the%20data.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-170252%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%20Online%20Custom%20Master%20Page%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-170252%22%20slang%3D%22en-US%22%3EThe%20kind%20of%20customizations%20in%20the%20screenshot%20can%20be%20done%20without%20creating%20a%20custom%20master%20page.%20Basically%20you%20need%20to%20develop%20custom%20WebParts%20(SPFx%20or%20just%20Content%20Editor%20WebParts%20with%20JS%20embedded)%20%2B%20injecting%20the%20required%20JavaScript%20and%20CSS%20to%20customize%20top%20navigation%20bars%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-170246%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%20Online%20Custom%20Master%20Page%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-170246%22%20slang%3D%22en-US%22%3E%3CP%3EThank%20you%20for%20the%20response.%3CBR%20%2F%3E%3CBR%20%2F%3EI%20understand%20I%20should%20avoid%20custom%20master%20page%20route%20and%20I%20would%20also%20want%20to%20stick%20to%20the%20recommendation.%3CBR%20%2F%3E%3CBR%20%2F%3EPlease%20review%20the%20attached%20screenshot%20and%20the%20site%20%3CA%20href%3D%22https%3A%2F%2Fwww.parlament.ch%2Fen%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.parlament.ch%2Fen%3C%2FA%3E%20(The%20Swiss%20Parliament).%20I%20want%20to%20build%20similar%20thing.%3CBR%20%2F%3E%3CBR%20%2F%3EBasically%2C%20in%20Office%20365%20(E3%20license)%2C%20I%20want%20custom%20branding%20with%20webparts%20that%20pull%20information%20from%20various%20SharePoint%20Apps%20(such%20as%20Delve%2C%20PowerApps%2C%20Yammer%2C%20Planner)%20and%20few%20more%20webparts%20that%20contain%20news%2C%20events%2C%20rollup%20data%20from%20sharepoint%20etc...%3CBR%20%2F%3E%3CBR%20%2F%3EI%20can%20build%20SharePoint%20Addins%20to%20pull%20data%20from%20various%20SharePoint%20Apps%20and%20create%20webparts%20to%20get%20data%20from%20within%20sharepoint.%3CBR%20%2F%3E%3CBR%20%2F%3EThe%20only%20question%20that%20remain%20is%20about%20branding%20the%20SharePoint%20landing%20page%20such%20that%20it%20only%20contains%20things%20that%20I%20want%20to%20expose%20to%20the%20users%20and%20not%20other%20things%20such%20as%20Apps%20launcher%2C%20Ribbon%2C%20etc..%3CBR%20%2F%3E%3CBR%20%2F%3EI%20couldn't%20find%20anything%20that%20specific%20in%20the%20recommendation%20links%20you%20sent.%20Any%20suggestions%20on%20sticking%20to%20the%20recommendation%20and%20brand%20SharePoint%20similar%20to%20the%20screenshot%2FSwiss%20Parliament%20website%3F%3CBR%20%2F%3E%3CBR%20%2F%3EPlease%20advise.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-168981%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%20Online%20Custom%20Master%20Page%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-168981%22%20slang%3D%22en-US%22%3ETotally%20agree%20with%20Paul.%20In%20general%20avoid%20to%20create%20custom%20master%20pages%20in%20SPO.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-168662%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%20Online%20Custom%20Master%20Page%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-168662%22%20slang%3D%22en-US%22%3E%3CP%3EYou%20definately%20could%20use%20Visual%20Studio%20to%20create%20a%20custom%20Master%20Page%20so%20that%20you%20can%20utilize%20version%20control%20%2F%20source%20control.%20You%20should%20however%20consider%20your%20approach%20to%20branding%20carefully.%20In%20general%20custom%20Master%20Pages%20should%20be%20avoided...%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPlease%20read%20about%20the%20latest%20guidance%20in%20the%20articles%20below%3A%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fsolution-guidance%2Fportal-branding%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fsolution-guidance%2Fportal-branding%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fsolution-guidance%2Fbranding-and-site-provisioning-solutions-for-sharepoint%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fsolution-guidance%2Fbranding-and-site-provisioning-solutions-for-sharepoint%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHave%20you%20considered%20making%20use%20of%20Communication%20Sites%20in%20SharePoint%20Online%3F%20These%20type%20of%20sites%20are%20generally%20considerd%20to%20be%20the%20successor%20to%20traditional%20Publishing%20Sites%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1318701%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%20Online%20Custom%20Master%20Page%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1318701%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F125684%22%20target%3D%22_blank%22%3E%40Shital%20Patel%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20article%20on%20SharePoint%20Custom%20Master%20Page.%20Helped%20me%20in%20getting%20some%20Old%20SharePoint%20features%20back.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20title%3D%22http%3A%2F%2Fsharepointsolutions-sudheer.blogspot.com%2F2020%2F04%2Fcustom-master-page-modern-site-sharepoint-online.html%22%20href%3D%22http%3A%2F%2Fsharepointsolutions-sudheer.blogspot.com%2F2020%2F04%2Fcustom-master-page-modern-site-sharepoint-online.html%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttp%3A%2F%2Fsharepointsolutions-sudheer.blogspot.com%2F2020%2F04%2Fcustom-master-page-modern-site-sharepoint-online.html%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1318708%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%20Online%20Custom%20Master%20Page%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1318708%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F125684%22%20target%3D%22_blank%22%3E%40Shital%20Patel%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%20**bleep**al%2C%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EThis%20article%20on%20SharePoint%20Custom%20Master%20Page.%20Helped%20me%20in%20getting%20some%20old%20SharePoint%20features%20back.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20title%3D%22http%3A%2F%2Fsharepointsolutions-sudheer.blogspot.com%2F2020%2F04%2Fcustom-master-page-modern-site-sharepoint-online.html%22%20href%3D%22http%3A%2F%2Fsharepointsolutions-sudheer.blogspot.com%2F2020%2F04%2Fcustom-master-page-modern-site-sharepoint-online.html%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttp%3A%2F%2Fsharepointsolutions-sudheer.blogspot.com%2F2020%2F04%2Fcustom-master-page-modern-site-sharepoint-online.html%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1318739%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%20Online%20Custom%20Master%20Page%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1318739%22%20slang%3D%22en-US%22%3E%3CP%3EThis%20article%20on%20SharePoint%20Custom%20Master%20Page.%20Helped%20me%20in%20getting%20some%20Old%20SharePoint%20features%20back.%3CBR%20%2F%3E%3CA%20title%3D%22custom%20master%20page%20for%20modern%20site%20-%20sharepoint%20online%22%20href%3D%22http%3A%2F%2Fsharepointsolutions-sudheer.blogspot.com%2F2020%2F04%2Fcustom-master-page-modern-site-sharepoint-online.html%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ecustom%20master%20page%20for%20modern%20site%20-%20sharepoint%20online%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

Hi there,

 

I have to create SharePoint Online publishing site with lot of branding like dashboard. I read few articles but couldn't find proper way to start with.

 

First I want to customize master page, I know we can do using design manager & SharePoint designer but can I do using Visual studio so that I can utilize version control?

 

Any link  or sample would be appreciated.

19 Replies
Highlighted
Solution

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-sol...

 

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

Highlighted
Totally agree with Paul. In general avoid to create custom master pages in SPO.
Highlighted

Thank you for the response.

I understand I should avoid custom master page route and I would also want to stick to the recommendation.

Please review the attached screenshot and the site https://www.parlament.ch/en (The Swiss Parliament). I want to build similar thing.

Basically, in Office 365 (E3 license), I want custom branding with webparts that pull information from various SharePoint Apps (such as Delve, PowerApps, Yammer, Planner) and few more webparts that contain news, events, rollup data from sharepoint etc...

I can build SharePoint Addins to pull data from various SharePoint Apps and create webparts to get data from within sharepoint.

The only question that remain is about branding the SharePoint landing page such that it only contains things that I want to expose to the users and not other things such as Apps launcher, Ribbon, etc..

I couldn't find anything that specific in the recommendation links you sent. Any suggestions on sticking to the recommendation and brand SharePoint similar to the screenshot/Swiss Parliament website?

Please advise.

Highlighted
The kind of customizations in the screenshot can be done without creating a custom master page. Basically you need to develop custom WebParts (SPFx or just Content Editor WebParts with JS embedded) + injecting the required JavaScript and CSS to customize top navigation bars
Highlighted

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.

Highlighted

Thank you @Paul Pascha and @Juan Carlos González Martín for the answers.

Highlighted
Highlighted

Users expect the App Launcher to be present, i would not recommend trying to hide it or anything on the Office Suite Bar. You cannot anticipate what a user wants to do next and trying to force them to go on a specific path will be huge waste of time and effort. 

I recommend thinking about this a little differently. Office 365 is a huge set of apps that is constantly changing, your app/intranet is going to be just one more of those apps. You will be more successful if you design your content to work within the Office 365 suite provided by MS than if you try to replace what is already there.

Highlighted

Hi @Shital Patel,

 

To answer your question, here is an article I wrote a long time ago on how to package master pages and page layouts with Visual Studio. However notice the date - this article was hot 7 years ago. To give some perspective - Windows 7 had recently come out, and iPhone had not even been announced when this was written! Just think how much the technology world has changed since then. Nobody cared about making web sites mobile-ready, for example, since there were no devices worth surfing the web on! So I'm going to pile on with everybody else and try to persuade you to take a more modern approach, much as I would tell a friend not to build a home on an eroding beach.

 

Having a custom master page has a couple of side-effects:

 

  • It locks you forever into "classic" SharePoint. Page sizes are bigger, performance is slower. Even if you invest in making your page responsive, none of the classic web parts are responsive, so your mobile experience won't be very good unless you write all custom web parts. None of the cool modern web parts work in classic mode (however as another commenter replied, you could write your own in SPFx and they'd work across classic and modern sites).

  • It's an ongoing "tax". Microsoft sometimes changes the master pages to fix bugs or introduce new O365 features. If you use your own master page, you need to take responsibility for checking to see if Microsoft has changed their master page, and then merge the changes in with yours.

Indeed, script injection (as I did in this article here) is a reasonable path, but you may find it difficult to do the level of branding you require, and script injection creates potentially brittle dependencies on certain HTML elements being present. If you hide an element that contains the O365 suite bar and then Microsoft changes its element ID, your code won't work anymore. Since you'd be essentially taking a dependency on product internals, there would be no warning as there would be with an API or feature change.

 

I have yet another option for you to consider: Write a web site outside of SharePoint, and pull the content into it using the API. This gives you complete control, and you can still use the CMS features of SharePoint. If you secure your page with Azure AD, you'll enjoy single sign-on with O365, and can use delegated permissions to act on the end user's behalf without ever touching a username or password.

 

WIth this approach authoring, document uploading, security, etc. could all be set in (unbranded) SharePoint, and your web site could reach in on the user's behalf and pull out the content and present it any way you want. Thus your coding effort is only on the UI, not authoring and administration. This is fully supported and completely immune to UI changes from Microsoft. Some 3rd party "Intranet in a Box" vendors have taken this approach. The downside is that you lose the ability to bring in web parts from SharePoint or 3rd parties, but maybe that's not so important if you want pixel-perfect control over the user experience.

 

 

 

Thanks and best of luck to you!

Highlighted

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

Highlighted

If we decide to use spfx widget for customization. Can we write a full page spfx app? hiding the quick launch?

 

Regards,

Syed

Highlighted

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; here is an example 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 Here's a good article with pros/cons on using classic sites with master page branding vs. modern.

 

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!

Highlighted

There is no way to do this with SPFx right now; add your vote to this UserVoice if you'd like to see that added! Meanwhile you can always use a non-SPFx widget with SPFx type tooling (see Julie Turner's blog article) and host it on an .aspx page in a document library. If you're careful it will port easily to SPFx!

Highlighted

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

Highlighted

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!

 

Highlighted

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

Highlighted

@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

Highlighted

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-835d... 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...

Highlighted

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,