Online Training On SharePoint
                      

Wednesday, 27 January 2010

Saving Web Part with SharePoint Designer 2010

With SharePoint 2010 ability to save a Web Part is introduced. We can save a Web Part using SharePoint Designer 2010. This saved web part will have all the setting and the content specified and it can be used in the same site collection multiple times. This is very helpful if there are certain web parts which are getting reused in multiple places. Users do not need to configure them again and again insted of that a Web Part can be created with all these properties and which can be used multiple times.
So Now I will show how to achieve this. I will save a Content Editor Web Part which is showing the data from a text file which is available in one document liberary. Here are the steps for doing this:
1. Go to SharePoint Designer 2010 and inser a Content Editor Web Part.
2. Select the Web Part and go to Web Part Tools and Format. There we have two options to Save the Web Part.



If we save the Web Part in the Site Gallery this will save the web part in the Web Part Gallery else we can save this web part into a file which can be uploaded later to another gallery. I will select the Site Gallery Option.
3. This will prompt a dialog box where we can specify the name for this Web Part and the description. Also we can set the propery for this Web Part.


4. I have uploaded a text file in one of the document libraries and I will point my content editor web part to this text file using this Set Propertied button:


5. Once this is done we are ready to use this saved Content Editort Web Part into any page. This Saved Web part will be available under miscellaneous Category.


 6. Once we place this web part it will show the text from the text file it was pointing to. If we change the content of the text file automatically Web Part content will also be refreshed.


This concepts is very helpful in the scenario where we want to create our own data view web parts based on some list or document library data. We can create a Web Part like this and save that web part. While doing this, there is yet another prompt saying:



If we select No, the Web Part will show data from the list at the path validation, relative to the site in which it is used. So we can use this web part in any site having a list called Validation. With this this saved Data View Web Part can be resued in multiple environments.
Post a Comment
Related Posts with Thumbnails