36
SharePoint SharePoint Portfolio Portfolio Marcelo Solangon Marcelo Solangon [email protected] [email protected] om om (201) 289-2667 (201) 289-2667 SetFocus SharePoint Master’s Program

SharePoint Project Phase 3 to 4

Embed Size (px)

DESCRIPTION

SharePoint project phase 3 to 4.

Citation preview

Page 1: SharePoint Project Phase 3 to 4

SharePoint SharePoint

PortfolioPortfolio

Marcelo SolangonMarcelo [email protected]@setfocus.

comcom

(201) 289-2667(201) 289-2667

SetFocus

SharePoint Master’s Program

Page 2: SharePoint Project Phase 3 to 4

Project Phase 3Project Phase 3

ObjectivesObjectives Apply a different theme and customize the default Master Page Apply a different theme and customize the default Master Page

to the Solution site collection. Use Search Web Parts to display to the Solution site collection. Use Search Web Parts to display helpful information on Solutions elsewhere in the Solution Portal.helpful information on Solutions elsewhere in the Solution Portal.

Project DeliverablesProject Deliverables Apply a different theme to the Solution site collection from the Apply a different theme to the Solution site collection from the

Solution site collection’s Themes Gallery.Solution site collection’s Themes Gallery. Create and deploy a custom Master Page to the Solution site Create and deploy a custom Master Page to the Solution site

collection.collection. Utilize a series of web parts that perform search results or Utilize a series of web parts that perform search results or

display Solution items in different portions of the site.display Solution items in different portions of the site.

Page 3: SharePoint Project Phase 3 to 4

Project Phase 3Project Phase 3

Page 4: SharePoint Project Phase 3 to 4

Project Phase 3Project Phase 3

Milestone 8a: Add an Authoring Publishing site.Milestone 8a: Add an Authoring Publishing site. Create a new publishing subsite called “Authoring”.Create a new publishing subsite called “Authoring”. Apply a different theme to the Solution site collection.Apply a different theme to the Solution site collection. Create a new welcome page based on a blank web part Create a new welcome page based on a blank web part

template.template. Add three functional navigation links with web content editor Add three functional navigation links with web content editor

web part.web part. Add a custom search results page.Add a custom search results page.

Milestone 9a: Add a Production Publishing Site.Milestone 9a: Add a Production Publishing Site. Add a new web application based on a blank site.Add a new web application based on a blank site. Configure web content migration from the authoring site to the Configure web content migration from the authoring site to the

production site.production site. Complete deployment of the authoring site to production site.Complete deployment of the authoring site to production site.

Page 5: SharePoint Project Phase 3 to 4

Project Phase 3Project Phase 3

Page 6: SharePoint Project Phase 3 to 4

Project Phase 3Project Phase 3

Page 7: SharePoint Project Phase 3 to 4

Project Phase 3Project Phase 3

Page 8: SharePoint Project Phase 3 to 4

Project Phase 3Project Phase 3

Page 9: SharePoint Project Phase 3 to 4

Project Phase 3Project Phase 3

Page 10: SharePoint Project Phase 3 to 4

Project Phase 3Project Phase 3

Page 11: SharePoint Project Phase 3 to 4

Project Phase 3Project Phase 3

Page 12: SharePoint Project Phase 3 to 4

Project Phase 3Project Phase 3

Milestone 10a: Author New Content and Quick Milestone 10a: Author New Content and Quick Deploy.Deploy. Create a new subsite on authoring with a custom theme named Create a new subsite on authoring with a custom theme named

Sales.Sales. Add two unique Article pages to sales.Add two unique Article pages to sales. Create new article page on authoring site and quick deploy it to Create new article page on authoring site and quick deploy it to

production. Verify only the new article page deploys.production. Verify only the new article page deploys. Deploy the new sales site and verify success.Deploy the new sales site and verify success.

Page 13: SharePoint Project Phase 3 to 4

Project Phase 3Project Phase 3

Page 14: SharePoint Project Phase 3 to 4

Project Phase 3Project Phase 3

Page 15: SharePoint Project Phase 3 to 4

Project Phase 3Project Phase 3

Page 16: SharePoint Project Phase 3 to 4

Project Phase 3BProject Phase 3B

ObjectivesObjectives Change the look and feel of the solution site. Create a new list

and a form that managers can use to submit Change Management Requests for a solution. Create a new list to display all the existing Solution sites. Create a web part to view all Solution list items. Create a web part to allow managers to create new SharePoint Solution sites. Create a web part to allow managers to view all Solution sites, and delete those sites

Project DeliverablesProject Deliverables Apply a different theme to the Solution site collection Create and deploy a custom Master Page to the Solution site

collection. sure to copy the existing default.master page FIRST

and do not modify it directly. Instead, modify your copy.

Page 17: SharePoint Project Phase 3 to 4

Project Phase 3BProject Phase 3B

Page 18: SharePoint Project Phase 3 to 4

Project Phase 3BProject Phase 3B

Change Management List Definition. Change Management Request List. Change Management Request form in InfoPath that submits to

the Change Management Request List. Solution List Definition with event receiver that prevents item

deletion. Solutions list using this definition, with Solution Content Type

applied to it. Add a Content Query Web Part to the page that displays all

items created using the Solution content type. A custom web part that will create a new SharePoint site under

the current site, using a specified name and a site template chosen from the site’s collection of available Site Templates.

A custom web part that will list all the Solution list items, and allow a manager to delete an item. Deleting will remove not only the Solution list item, but the related sub-site as well.

Page 19: SharePoint Project Phase 3 to 4

Project Phase 3BProject Phase 3B

Milestone 12: Change Management Request List Create a new SharePoint List Definition project in Visual Studio. Pick “Form Library” from the Base List Definition dropdown list. Ensure that “Add with Event Receiver” is checked. Rename the folder from ListDefinition1 to

“ChangeManagementListDefinition”. In the Schema.xml file, change the Title of the List to “Change

Management List Definition”. In ListDefinition.xml, change the Name of the ListTemplate to

“ChangeManagementListDefinition” and DisplayName to “ChangeManagement List Definition”.

In the ItemEventReceiver.cs file, give the class a meaningful name.

In the ListEventReceiver.cs class, change the name of the class to “ChangeManagementListEventReceiver”.

Page 20: SharePoint Project Phase 3 to 4

Project Phase 3BProject Phase 3B

Deploy the solution. Check in the 12 hive to ensure you have 3 features – for the List

Definition, the List Event receiver, and the Item even receiver. Activate the features on the Solutions site collection. On the Solution Portal root site, create a new list using the

Change Management Request List Definition template. Create an instance of the list definition. Create a new Change Management Request Form using InfoPath New forms should have a unique filename that includes the

DateTime created. The form must submit to the Change Management Request

Library you just created. The form should contain the following information:

Manager Username (Text) Manager Full Name (Text) Request Date (DateTime) Request Description (Rich Text – Xhtml)

Page 21: SharePoint Project Phase 3 to 4

Project Phase 3BProject Phase 3B

Milestone 13: InfoPath Change Management Request Form Design a new Form Template based on the Blank Template

Ensure “Enable browser-compatible features only is selected”. Under Submit Options choose “Allow Users to submit this form”

and submit to a SharePoint document library. Add a data connection to the Change Management Requests

library. Use the path to the Change Management list: http://vm179/solutions/Change%20Management%20Request/ Give the file name a meaningful name. Use Xpath to dynamically populate this name based on the username and date, or on other fields.

Add the following items to the Data Source: Manager User Name (Text), Manager Full Name (Text), Request Date (DateTime), Request Description (Text).

Publish to your SharePoint server Change Management List as a Document Library template (not Site Content Type).

Page 22: SharePoint Project Phase 3 to 4

Project Phase 3BProject Phase 3B

Go back to the Change Management request library and test by creating a new request.

Create a new Solution List Definition. List must be based on the Custom List definition. Prevent users from deleting any items from the list. They should

see an error message that says, “Solution items cannot be deleted”.

Packaged as a feature for deployment.

Milestone 14: Solution List Definition Create a new SharePoint List Definition project. Pick “Custom List” from the Base List Definition dropdown list. Ensure that “Add with Event Receiver” is checked. Rename the folder from ListDefinition1 to

“SolutionListDefinition”. In the Schema.xml file, change the Title of the List to “Solution

List Definition”.

Page 23: SharePoint Project Phase 3 to 4

Project Phase 3BProject Phase 3B

In ListDefinition.xml, change the Name of the ListTemplate to “SolutionListDefinition” and DisplayName to “Solution List Definition”

In the ItemEventReceiver.cs file, give the class a meaningful name.

Uncomment the following method: “ItemDeleting”. Add an error message when the user tries to delete the item,

and set the Cancel property to true to stop the deletion from occurring.

public override void ItemDeleting(SPItemEventProperties properties){properties.ErrorMessage = "Solution entries cannot be deleted.";properties.Cancel = true;}

In the ListEventReceiver.cs class, change the name of the class to “SolutionListEventReceiver”.

Page 24: SharePoint Project Phase 3 to 4

Project Phase 3BProject Phase 3B

Deploy the solution. Check in the 12 hive to ensure you have 3 features – for the List

Definition, the List Event receiver, and the Item event receiver. Activate the features on the Solutions site collection. On the root of the Solution Portal, create a new Solutions list

from the Solution List Definition. On the Advanced Properties of the Solutions list, allow Manage

Content Types. Add the Solution Content Type to the Solutions list as the

default. Modify the “All Items” view to show these new columns. Add this list’s web part on the front page. Create a Solutions list using this definition. Assign the Solution content type you created in Project 2 to this

list. Create a Content Query Web Part on your Solution Dashboard

main page that finds and displays all Solution items in the site collection.

Page 25: SharePoint Project Phase 3 to 4

Project Phase 3BProject Phase 3B

Milestone 15: Content Query Web parts Add a content query web part (CQWP) to your Solution

Dashboard page with the following settings: Show items from all sites in this site collection Show items from this list type Solution List Show items of this content type group Custom Content Types Show items of this content type: Solution

Include child content types Create a custom web part to create new sub-sites with a site

template. The web part should create a new SharePoint site under the site and the web part is deployed to

Allow the user to create a new site name. Allow the user to specify a site template to use, from a dropdown

list. Indicate visually whether it succeeded or failed Hide the input controls upon success, and provide a button to create

a new solution. Provide a Web Part Property that allows the administrator to specify

the name of the Solution list.

Page 26: SharePoint Project Phase 3 to 4

Project Phase 3BProject Phase 3B

Milestone 16: Create Solution Site Web Part Create a new Web Part SharePoint project in Visual Studio. Rename the folder to CreateSolutionSiteWebPart. Rename WebPart1.cs to CreateSolutionSiteWebPart. Rename WebPart1.webpart to

CreateSolutionSiteWebPart.webpart. Change its settings to have a more meaningful error message, title, and description.

Rename WebPart1.xml to CreateSolutionSiteWebPart.xml. Modify its xml references to WebPart1.

Add code to display the following components: A message indicating success or failure; Labels and textboxes to allow a user to enter the name of

the new site, its description, and its intended URL; A dropdown list containing all of the available Site Templates

that can be chosen; A button to submit the input.

Page 27: SharePoint Project Phase 3 to 4

Project Phase 3BProject Phase 3B

Add an event to handle the click of the Submit button. This method must create a new site using the user’s input.

Implement an OnLoad method to call EnsureChildControls(); . This will ensure that the Submit button’s event will fire.

Add a checkbox to allow Unique Permissions when creating a site. By default this should be set to false – ie the site should inherit permissions from its parent. Make sure your web site creation code uses the value of the checkbox.

Add a textbox property in the Modify Shared Settings window to allow users to specify the name of the Solution list they are updating. Give it a default name in case they don’t fill in the value. This property makes it easier for you to deploy this Web part somewhere else, or change the value if the Solution list name changes for

some reason. Try running the Web part as a user without Full Control

permissions. If an error is encountered, trap it and display a message.

Page 28: SharePoint Project Phase 3 to 4

Project Phase 3BProject Phase 3B

If you haven’t done so already, create a SharePoint group called “Solution Managers” and check to make sure the user is part of that group before you let them create a sub-site. If they are not, display a message accordingly. What permissions must the group have to let its members a) add an item to the Solutions list and b) create a new sub-site.

Add RunWithElevatedPermissions code to the Web part so that no matter what permissions the user has, the sub-site can be created. Consider the implications of this. http://msdn.microsoft.com/enus/library/microsoft.sharepoint.spsecurity.runwithelevatedprivileges.aspx.

Deploy the Web part solution to the farm. Activate the Feature on the Solutions site collection. Edit the home page of the Solution Portal. Add the new Web part to the home page.

Page 29: SharePoint Project Phase 3 to 4

Project Phase 3BProject Phase 3B

Create a custom web part to manage the created Solution sites. The web part should:

Show a GridView with all the Solution list items bound to its data source.

Allow the manager to delete the item and the related sub-site.

Indicate visually whether it succeeded or failed Hide the input controls upon success, and provide a button

to return to the Grid.

Milestone 17: Solution Management Web Part Create a new Web part SharePoint project in Visual Studio. Rename the folder to SolutionManagementSiteWebPart. Rename WebPart1.cs to SolutionManagementSiteWebPart. Rename WebPart1.webpart to

SolutionManagementSiteWebPart.webpart. Change its settings to have a more meaningful error message, title, and description.

Page 30: SharePoint Project Phase 3 to 4

Project Phase 3BProject Phase 3B

Rename WebPart1.xml to SolutionManagementSiteWebPart.xml. Modify its xml references from WebPart1.

Add code to display the following components: a GridView displaying all the Solution Items. A DataSource of some kind that contains all the ListItems.

Add an event to handle the click of the Delete button. This method must delete the Solution List item and the sub-site, based on information provided from the selected the row.

Deploy the Web part solution to the farm. Activate the Feature on the Solutions site collection. Edit the home page of the Solution Portal. Add the new Web part to the home page.

Page 31: SharePoint Project Phase 3 to 4

Project Phase 3B & 4Project Phase 3B & 4

Page 32: SharePoint Project Phase 3 to 4

Project Phase 4Project Phase 4

ObjectivesObjectives Create a Search Center. Modify the Advanced Search page to

search by the SiteTemplate column. Create a web part to allow users to run custom Keyword search queries and view the results. Modify the Search Results output to show the raw search results. Deploy an Excel Services spreadsheet to report on Solution metrics. Create a new KPI list to use KPIs against the Excel Services spreadsheet

Project DeliverablesProject Deliverables Create a Search Center where you can modify Search Results. A custom web part that allows a user to enter a keyword query

into a textbox, and display the query results in a grid. Modify the search results output XSL to show the raw search

results

Page 33: SharePoint Project Phase 3 to 4

Project Phase 4Project Phase 4

Milestone 18: Search Centre with Managed Property Search Create a new Search Center with Tabs site called Search. Edit the Advanced Search page - modify Advanced Search Box under propertyDefs add a new PropertyDef element for the

SiteTemplate managed property Under ResultType "All Results" add a new PropertyRef element

for SiteTemplate Show the scope picker Hide the Languages picker Create Site Collection Search Settings and Scopes

Milestone 19: Site Collection Search Settings and Scopes In site collection settings, under search settings: choose use

custom scopes. Set the search page to be : /solutions/search/Pages/

Page 34: SharePoint Project Phase 3 to 4

Project Phase 4Project Phase 4

In Site Collection settings, create a new Search Scope Give it the name “Only Sites Created using Solution Site

Templates” Choose both advanced and dropdown for appearance Add a rule - property query - choose SiteTemplate from

dropdown list = "Solution Site Template". Make it required Wait about a minute until the scope is updated, in the search

dropdown you will now see the new scope The search results will only display solution content types whose

site template value is equal to Solution Site Template Create a custom web part to make custom keyword search

queries. The web part should: Allow the user to enter query text Execute a Keyword query on the Search engine Show a gridview with all the Search results bound to its

DataSource

Milestone 20: Custom Search Web Part In your web part project, reference the SharePoint Search DLL -

kept in Microsoft.sharepoint.search DLL (12 hive \ISAPI folder).

Page 35: SharePoint Project Phase 3 to 4

Project Phase 4Project Phase 4

Assign an indexer to your content database: in central admin >Application Management > SharePoint Web Application Management : Content databases > [select the content database used by your site] > Search Server : Select Windows SharePoint Services search server.

Write code that will display a textbox input as a keyword search query in a GridView. You can auto-generate columns for simplicity.

Execute the search query and bind to the grid’s DataSource. Optional: Add controls to display the number of results and to

limit the maximum number of results returned. Modify the Search Results web part to view the raw XML results.

Milestone 21: Test showing Raw XML Search Results Edit search results page, and modify "Search Core Results" web

part’s Data View Properties Copy the existing XSL and save for later use.

Page 36: SharePoint Project Phase 3 to 4

Project Phase 4Project Phase 4

Replace the existing XSL with the new XSL snippet (below):

<xsl:stylesheet version="1.0"xmlns:xsl="http://www.w3.org/1999/XSL/Transform" ><xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" /><xsl:template match="/"><xmp><xsl:copy-of select="*"/></xmp></xsl:template></xsl:stylesheet>

Save the page. Ignore any errors that might appear. Refresh the page and perform a web search to view the raw XML results.

Revert the Search Results page to show regular results.