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.
After creating the page use the Edit Page option and from the Insert tab click on the Web Part button.
After inserting the specified web part you can use the Save & Close button from the Page tab to save the changes.
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
In Action
The following is the saved page after inserting the web part.
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.
In Action
The following is the saved page after inserting the web part.
Team Discussion Web Part
Purpose: This web part can be used to list to hold newsgroup-style discussions on topics relevant to your team.
In Action
The following is the saved page after inserting the web part.
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
In Action
The following is the saved page after inserting the web part.
For adding formatted text you can use the Edit Page option; the Format Text tab is visible like below:
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:
- Create a new Java Script file
- Upload it to the Site Assets library
- Add a Content Web Part
- Modify the HTML Source
- 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.
Now add a new Content Editor Web Part and click on the Format Text tab > HTML button > Edit HTML Source link.
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:
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.
In Action
The following is the saved page after inserting the web part.
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.
In Action
The following is the saved page after inserting the web part.
Organization Browser Web Part
Purpose: This web part displays each person in the reporting chain in an interactive view optimized for browsing organization charts.
In Action
The following is the saved page after inserting the web part.
Site Users Web Part
Purpose: This web part can be used to to see a list of the site users and their online status.
In Action
The following is the saved page after inserting the web part.
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.