So I am in the process of trying to create and 'package' web parts for a client.

Basically what this entails is taking a 'Content Search' web part, edit the query, edit the properties, and add the JSLink.

I then want to 'save' this webpart so the customer can add this to anywhere else on the site, without having to re-do all the properties and query settings.

I thought I could do this by setting up the webpart, and then 'exporting' it and then uploading it to the gallery for quick selection, however I don't see the option to 'export' the web part.

I then saw a video where somebody then advises to go into 'edit web part properties' and change the 'edit mode' dropdown to allow exporting, but I dont see this field in the properties either.

Am I missing something else here?


  • Yes, I believe it is. – Simon Jun 5 '15 at 11:48
  • Edit the page in the browser
  • Inspect the DOM to find the div containing your web part
  • Change the allowexport property to true

<div ... webpartid="my-web-part-id" allowexport="false"> becomes <div ... webpartid="my-web-part-id" allowexport="true">

This should enable the 'Export...' option in the context menu for the web part.


I found another way to export a web part. There is a hidden page in SharePoint that takes a couple of query strings for the web part Id and the page URL and generates a file with the exported web part.

You can get the web part Id from the HTML source of the page.


Hope this is useful to someone


You can follow the below steps:

  1. Open the Page in SharePoint designer.

  2. Select the web part for which you want to export.

  3. Change the "ExportMode" property to be "All" (if you do not find the property then add new attribute)

If you are using publishing page then you have to change the way.

  1. Locate the page in the SharePoint designer.

  2. Copy the page where the web part lies.

  3. Paste that page at same location.

  4. Select the page and you will see the option "Detach From Page Layout"

  5. After that edit the page and you will see the Webpart tags and in the desired web part you will have to add/set the attribute. Web part tag will have Title attribute which will be helpful to find the appropriate web part.

  6. Go to the pages library and edit page which was copied for edit, now you will be able to see the Export option in web part edit mode. Hope this helps to you.!!

  • Thanks for the reply, Im unable to find the 'Export Mode' property and am a little unsure how to add the attribute? Can you explain a little more how to do that? :) Thanks! – Simon Jun 5 '15 at 11:52
  • Have you attached page layout to that page? – users1100 Jun 5 '15 at 12:00
  • Yes, I am using a custom page layout. – Simon Jun 5 '15 at 12:09
  • The edited answer will help you, please follow the steps for the publishing page in answer. – users1100 Jun 5 '15 at 12:11

I did this using SharePoint Designer. Steps are below,

  1. Open SharePoint Designer
  2. Open page where webpart added and Edit it
  3. Set properties ExportControlledProperties="True" and ExportMode="All"
  4. Save page
  5. Open page in browser and edit it
  6. You will find Export options

I had faced similar issue in my project, the solution is to open the required page in SharePoint Designer and look for the web part which you want export and then add/change the ExportMode Property to "All"

after this you should be able to see the export the web part option when you click on the web part

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.