1

I want to create an app that will add some javascript and a web part to a page in SharePoint.

The page is a list page and already exists (AllItems.aspx page in the document library). I just want to add some js and a web part to it.

I am using SharePoint 2013 (i want to make this reusable so it has to be an app).

Is this possible using the app model and if so are there any tutorials?

1
  • Why does it have to be an app? Apps are not the only way to make things reusable. Templates are meant to be reusable, as @Keerthi's answer displays. – wjervis May 8 '15 at 16:42
1

If I have understood your question correctly,

Add the web part under edit page and also add the required js using the JS link.

Now go to list settings -> Save list as template.

The list will be now be saved as a template and it can be added under existing apps section.

2
  • I already have an app that provisions content types and lists. IDeally i just want something in this app where i can say add this snippet of js onto the AllItems.aspx page. This way every time this app is added to a site collection it will do it. – user1786107 May 8 '15 at 15:28
  • You can add the js file in the web part, export it and add it wherever necessary. Check this link: social.technet.microsoft.com/Forums/en-US/… – Keerthi May 8 '15 at 15:44

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.