SharePoint 2010 Built-in Web Parts

The site collection used here has the Team Site template with:

  • Announcements
  • Links
  • Team Discussion
  • Content Editor
  • Relevant Documents
  • Note Board
  • Organization Browser
  • Site Users

Testing the Web Parts

You can create a new Site Page for testing the Web Parts.

1.png

After creating the page use the Edit Page option and from the Insert tab click on the Web Part button.

2.png

After inserting the specified web part you can use the Save & Close button from the Page tab to save the changes.

3.png

Announcements Web Part

We can start playing with the Announcements Web Part.

Purpose: This web part can be used to track upcoming events, status updates or other team news.

Group: Lists and Libraries

4.png

In Action

The following is the saved page after inserting the web part.

5.png

Note: From this group you can add any existing list or library. This is a more convenient way of showing multiple lists in a page. If you cannot see an Announcements from the preceding group, go to the Lists and create a new list using the Announcements template.

Links Web Part

Purpose:
This web part can be used for creating links to Web pages that your team members will find interesting or useful.

6.png

In Action

The following is the saved page after inserting the web part.

7.png

Team Discussion Web Part

Purpose: This web part can be used to list to hold newsgroup-style discussions on topics relevant to your team.

8.png

In Action

The following is the saved page after inserting the web part.

9.png

Content Editor Web Part

Purpose: This web part can be used to use rich content. So this web part helps in adding formatted text, tables, hyperlinks, and images to a Web Part Page

10.png

In Action

The following is the saved page after inserting the web part.

11.png

For adding formatted text you can use the Edit Page option; the Format Text tab is visible like below:

12.png

Note: You can include JavaScript code in this web part and thus provide a higher control over the entire page if required.

Playing around more with Content Editor Web Part

Now let us try to do more with the Content Editor Web Part. Our purpose is to call a JavaScript method from inside the Content

Editor Web Part (in turn it is calling JavaScript from SharePoint).

The following are the steps involved:

  1. Create a new Java Script file
  2. Upload it to the Site Assets library
  3. Add a Content Web Part
  4. Modify the HTML Source
  5. Play the action

Create a new file and name it as JavaScript.js (attached). Insert the following contents inside it:

alert('A message from Java Script inside SharePoint 2010. How is that?');

Add the file into the Site Assets library in SharePoint. Site Assets is a pre-created folder in the site which is used to store CSS,

JavaScript and other site asset files. You can find it in Libraries > Site Assets.

13.png

Now add a new Content Editor Web Part and click on the Format Text tab > HTML button > Edit HTML Source link.

14.png

Add the following code in the dialog box that appears:

<script src="../SiteAssets/JavaScript.js" type="text/javascript"></script>

Now click OK to the dialog, go to the page, click the Save button and refresh the page. You should see the following dialog box from Java Script:

15.png

Note: Please note that the SiteAssets folder name is referred without spaces.

Relevant Documents Web Part

Purpose: This web part shows the documents that are relevant to the current user. Basically it will remember the documents the current user has accessed and provides a convenient feature.

16.png

In Action


The following is the saved page after inserting the web part.

17.png

Note Board Web Part

Purpose: This web part can be used to enable users to leave short, publicly-viewable notes about this page. Adding it to the home page helps in notifying all users of active events / messages.

18.png

In Action

The following is the saved page after inserting the web part.

19.png

Organization Browser Web Part

Purpose: This web part displays each person in the reporting chain in an interactive view optimized for browsing organization charts.

20.png

In Action

The following is the saved page after inserting the web part.

21.png

Site Users Web Part

Purpose: This web part can be used to to see a list of the site users and their online status.

22.png

In Action

The following is the saved page after inserting the web part.

23.png

References

http://tinyurl.com/sp2010-customwebpart
http://tinyurl.com/sp2010-cntedt
http://tinyurl.com/sp2010-wpjs

Summary

In this article we have explored the built-in WebParts in SharePoint 2010. I believe the knowledge will significantly assist you in making decisions while developing SharePoint solutions.

Up Next
    Ebook Download
    View all
    Learn
    View all