Integrate SharePoint Content Across-Sites

SharePoint provides the ability to synthesize and mashup content on pages or dashboards to promote of ease of use, build value and delight your business users. The content may reside on a site the users own or on another site across the SharePoint eco-system. The beauty is that we can handle both sets of content with just a bit of configuration.

This article provides a glimpse of what is possible with content and data that resides across your SharePoint environment or is integrated into your environment with Business Connectivity Services (BCS) or other 3rd party available connectors to get greater usage and value from your Line of Business (LOB) Systems.

Business Challenge

  • The IT Division site collection is the front door to all things IT and is owned by a few IT management personnel.
  • The Projects site collection is used for managing the ongoing list of projects across the IT Department and is owned by the Project Management Office (PMO)
  • The majority of IT and Business Users have been instructed to visit the IT Division site to understand the IT Mission, Objectives, Personnel, Projects, Help Desk, etc. To promote visibility into the Division and clarity of purpose, IT Management has requested that the key IT/Business Projects be displayed on a dashboard page within the IT Division site collection.

Expectations

  • Use out-of-the-box features and functionality to ensure future compatibility
  • Quick time to market
  • Ease of managing by existing staff into the future
  • Flexibility to expand look, feel and usage based on requirements
  • Retain full features of list/library for best user experience

Technical Tools

  • SharePoint 2010, 2013, Online
  • SharePoint Designer (SPD) 2013
  • Data View Web Part (DVWP)
  • Page Viewer Web Part (PVWP)

Requirements/Specs

  • A project dashboard page will be built in the IT Division site collection
  • The page will display the following columns
    • Project Name
    • Status
    • Owner(s)
    • Due Date
    • Project Manager
  • These list options and features will be available to the user
    • Toolbar of options
    • Ability to filter and sort the column data
    • Ability to switch to other views of the list

Basically, all of the options you find on a typical list/library of a site will need to be available for this project deliverable to be considered a success.

Assumptions

  • A new web part page has been created in the IT Division site collection
  • The PMO project list contains the needed columns and they are configured with the appropriate data types, default values, etc.
  • The PMO project list contains a few test entries

Configuration Steps

The majority of these steps will be within the SharePoint Designer (SPD) 2013 tool.

>> Get Connected

  1. open SPD 2013
  2. connect to the source site (ie; PMO site collection)

>> Create New ASP.Net Web Form Page

  1. select the menu tab of File
  2. select More Pages
  3. select the page type of ASPX
  4. select Create
    • provide a name (or leave as default; you can change later)
    • default location of Site Pages is great
    • select OK (select Yes when asked about opening in Advanced Mode)
    • the basic web form page syntax displays

      <form id=”form1″ runat=”server”>X
      </form>

>> Insert Empty Data View

  1. place your cursor after the server statement (ie; X marks the spot)
  2. select the menu tab of Insert
  3. select the Data View drop down; select Empty Data View
    NOTE:
    a few more statements were added to the form; the primary ones we will focus on next are as follows.

    <DataSources>X
    </DataSources>
    <datafields/>
    <XSL>
    </XSL>

>> Insert Data Source Details (ie; PMO Project List)

  1. place your cursor after the DataSources statement (ie; X marks the spot)
  2. select the menu tab of Insert
  3. select the Data Source drop down; select the PMO Project List
    NOTE: a few more lines were added to the form and the Data Source Details view pane displayed on the right side of the window
  4. Important: select Ctrl+Z
    NOTE: this removes the statements added to the form as we do not want those; rather, we will select the columns we want from the Data Source on the right
  • <XSL>X
    </XSL>

>> Insert Data Source Columns

  1. place your cursor after the XSL statement (ie; X marks the spot)
  2. press and hold the Ctrl key and click on each Data Source column to be included in the web form
  3. let up on the Ctrl key
  4. in the Data Source view on the right, select the Insert Selected Fields as … drop down and select Multiple Item View

>> Test Results

  1. select the menu tab of Home
  2. select the Preview in Browser drop down and select your screen size
  3. verify the content shows without errors

>> Presentation – Look and Feel

If you want the same font colors, styles and general CSS to be consistent with your SharePoint environment branding, view the source code of your existing SharePoint site, grab the CSS statements and include them just prior to the </head> statement.

>> Reality Check

The bulk of this exercise is now complete. The remaining steps relate to basic web part configuration and basic XSL construction.

>> No-Code Configuration – Web Form Options

  1. make sure your cursor is within the code of the web form
    NOTE: anywhere between the <XSL> and </XSL> statements will suffice
  2. select the menu tab of Options
  3. select Filter
    • include or exclude project list items as needed
  4. select Sort & Group
    • include sort or group conditions as needed
  5. select Parameters
    • add various parameters to gain access to the Users ID
  6. select Paging
    • configure as needed
  7. select Add/Remove Columns
    • configure as needed

>> No-Code Configuration – Design Options

  1. select the menu tab of Design
    • select the Toolbar Options drop down and try out the SharePoint Toolbar and/or the Grouping Toolbar

>> No-Code Configuration – Web Part Options

  1. select the menu tab of Web Part
  2. update the Web Part Title as needed
  3. update the Chrome Type as needed
  4. update the Chrome State as needed
  5. update the remaining options as needed
  6. Save your changes

>> XSL Updates

When previewing the page in the browser, you may have noticed that the columns show text with no links, etc. If you want to hyperlink to a list or library item, that requires a bit of configuration.

For example: Let’s say we want the Project Name column to link to the list item in the PMO Project list. To accomplish this, we do the following.

Before

  • <td class=”ms-vb”>
    <xsl:value-of select=”@Project_x0020_Name”/>
    </td>

After

  • <td class=”ms-vb”>
    <a href=”{@FileDirRef}/Dispform.aspx?ID={@ID}”>
    <xsl:value-of select=”@Project_x0020_Name”/>
    </a>
    </td>

  • Save any changes
  • Rename the page as needed; this page will be used in our final configuration; it’s probably best if it is not the default of ‘Untitled_1.aspx’

>> Configure The Page Viewer Web Part

  1. Navigate to the IT Division Site Collection page
  2. Edit the page
  3. Insert the Page Viewer Web Part
  4. In the Page Viewer Web Part Properties pane on the right
    • select Web Page
    • in the link field, enter the URL to the page configured above
      Ex: “/sites/ITDivision/SitePages/[page name].aspx”
  5. update the Appearance section as needed
  6. Save the web part
  7. Save the page

Additional Resources
Use Parameters to Capture User ID or Name
Access Server Variables to Use As Parameters
Configure Parameters and Filters
Configure DVWP and Other Tips

Advertisements
This entry was posted in Uncategorized, SharePoint Designer, Web Parts, XSL, Data View Web Part, Page Viewer Web Part. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s