8

Our company has restricted any modifications to 2013 SharePoint masterpages. For the most part I have been using layout pages to add scripts however if a site is not a publishing site, I am looking at other methods to perform this function. Even layout pages do not effect a collection but just the pages that are associated.

So my question is how can I add or inject scripts into the masterpage without touching it. Visual Studio method has also been shutdown to us. Any advice would be wonderful. PS: I am a novice coder, more designer.

thanks so much CSM

  • 1
    Search for UserCustomAction Scriptlinks... But even seasoned SharePoint programmers hardly use them.. so you need decent programming skills – Danny '365CSI' Engelman Mar 16 '17 at 19:42
  • Thank you very much for your response. I will give UserCustomAction ScriptLinks a try and also see if one of our programmers can assist. If you encounter any other options, please post. I will check back. Best regards..... csm – CSM Mar 20 '17 at 15:01
4

Some tools that make adding Script easier:

  • (Chrome Browser Extension) Cisar Edit CSR files with Live Updating

  • (Chrome Browser Extension) Chrome SP Editor Edit SharePoint files, add ScriptLinks to SiteCollection/Webs, manage Web Property Bag

  • add an ASPX Page (so works in any Browser) and manage UserCustomActions

0

have a look at the pnp power shell commands. can easily inject a script on every page of your site. i use it all the time on a 2013 site. works great. the command is add-sposcriptlink or something like that.

  • Hi there, thanks much for the info on the power shell command option. Question: If I create a GblScript.js file and have the server admin inject the script into the Seattle masterpage.... I am assuming that the process will not need to be repeated. I can just manage everything in the scripts file then....thoughts/suggestions? thanks much CSM – CSM Mar 22 '17 at 14:58
  • yes, that's right. – russellg Mar 22 '17 at 22:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.