I have a javaScript file that pulls info from a custom SharePoint list. I would like to use this setup on some of my other sites as well. How can I make a sharepoint app so that I can click and drop the app without having to create a new list and copy the js file every time. I don' want to publish the app just for my personal use on my websites.
-
Why not simply save the site as template?Emiliano Poggi– Emiliano Poggi2015-11-03 19:00:04 +00:00Commented Nov 3, 2015 at 19:00
-
Some sites are team sites others are publishing sites.Vinny– Vinny2015-11-03 19:48:02 +00:00Commented Nov 3, 2015 at 19:48
-
Can you be more clear about where this js file must be deployed in the site and from which page is referenced?Emiliano Poggi– Emiliano Poggi2015-11-03 19:54:04 +00:00Commented Nov 3, 2015 at 19:54
-
I reference the JS file in the master page. It should be allowed to be deployed on any of the sites pages.Vinny– Vinny2015-11-03 20:24:35 +00:00Commented Nov 3, 2015 at 20:24
-
Are these sites in the same site collection? Please be more clear about your target environment.Emiliano Poggi– Emiliano Poggi2015-11-03 22:02:52 +00:00Commented Nov 3, 2015 at 22:02
1 Answer
You could create a Solution Package (Farm or Sandbox) in Visual Studio that uses Collaborative Application Markup Language (CAML) to create the List and a Module to provision the JavaScript file into a Library in the target site. This project would include a Feature that, when activated, would add the list and provision the JavaScript file.
This YouTube video will help you get started: SharePoint 2010 for ASP.NET Developers . This video was made for SharePoint 2010 but the concepts also apply to SharePoint 2013 and SharePoint Online.