Table of Content Web Part: Slightly different in SharePoint 2013 / Online

The Table of Contents web part has been part of SharePoint’s make-up for a while now. It is useful function that is normally used to display a sitemap or to provide navigation for a sub site.

The Table of Contents Web Part has three main sections in the configuration pane:

  1. Content: This is where you configure what part of site hierarchy the Web Part displays. Enter the path to the page where you want to Table of Contents to begin in the Start From field. You can choose how many levels to display in the Table of Contents by using the Levels to Show drop-down list
  2. Presentation: This section controls how the items display. You can choose to display everything in a single column or multiple columns and select how the header is styled by selecting an option from the Header Style drop-down list
  3. Organization: Decide how you want the items sorted by selecting either the Sort Contents as They Are Sorted in Navigation or the Sort Contents Using the Following Settings radio button. If you choose the latter option, select applicable options from the Sort Sites By, Sort Pages By, and Sort Direction drop-down lists

For the most part, this functionality has remained exactly the same throughout the versions. However looking at the configuration options in SharePoint 2013 reveals one slight omission: the Display Columns setting.

This setting allowed you to specify the number of columns that the content was displayed in. However, in SharePoint 2013 / SharePoint online, the default column number is one. What this can potentially result in is a web part that displays its content in a very elongated, vertical manner.

To get around this, you can use the linked PowerShell Script to set the display column count. Please note that 7 is the maximum column count that you can use.

The variables that you will need to amend are: –

  • $web: Set this to the site level with the Table of Contents Web Part
  • $pages: Set the page name here that has the Table of Contents Web Part

Please note that the page itself must be checked in and published.

The script can be downloaded from the TechNet Gallery here.

The CodePlex Corner: Instant List Filter

The link to the Instant List Filter is https://instantlistfilter.codeplex.com/

This edition of the CodePlex Column delves into the SharePoint Instant List Filter, a project that’s both highly rated and has attracted a significant number of votes. It boasts an impressive 20k+ download count (at the time of writing). It was developed by Jaap Vossers and has previously attracted the attention of Marc Anderson and Alexander Bautz (both well-known JavaScript experts). As the product name suggests, the solution provides filter text boxes on a list/library to allow a “filter-as-you-type” functionality. It also needs JQuery to work successfully when it is deployed. Having being around since 2009, it would be fair to say that the list filter is one of the community products that has stood the test of time.

So, if it has been around for a while, the first question that may spring to mind is; what’s the point in taking a look at it now? The simple answer is the changing SharePoint landscape. As with a few other projects that have been discussed in the CodePlex Corner, the environment that the list filter was born into is very different to the one that we, as SharePoint professionals, have now. Some of the noticeable differences include more powerful versions of SharePoint, newer HTML / CSS standards for each one and of course, very different browser habits to contend with. It’s in this light that an in-depth look at the utility in context of its altered environment might be useful.

A good place to start is to look at how the list filter code responds to the various versions of SharePoint still in use today. Whilst investigating, the opportunity to test the code against the popular browsers of the day also presents itself. The timeline below looks at the release dates of all these products.

Building such a timeline provides two distinct advantages: –

  1. Identifiable points in time at which we can check browsing habits
  2. A linear route to allow us to see which browsers that SharePoint and the list filter would be expected to work with

Cross referencing the most recent three dates from the timeline above with the W3Schools Browser statistics provides the following insights into browser trends at the time of release for each product. The most noticeable thing is the huge increase in Chrome usage and the sharp drop in how many users are sticking with Internet Explorer. Mozilla’s Firefox, despite losing almost a third of its user base between May 2010 and November 2012 does still remain the intermediate browser of choice.

Date

IE

Firefox

Chrome

Mar-09

43.30%

46.50%

4.20%

May-10

32.20%

46.90%

14.50%

Nov-12

15.10%

31.20%

46.30%

Aug-14

8.30%

24.70%

60.10%

Whilst these statistics are for overall browser usage and not specific to SharePoint utilisation, keeping these trends in mind is important as SharePoint doesn’t necessarily play nicely with non-Microsoft browsers. Some of the more unique SharePoint features (like these) are built in Active-X, a proprietary technology that only works in Internet Explorer. Knowing these limits when planning browser support around a SharePoint deployment is invaluable. Extending this line of thinking to third party products both commercial and open source should be seen as a wise investment.

Armed with an idea of the likely browser habits of your audience, a SharePoint professional will know where to begin assessing the list filter. Should the project not work in any of the browsers above, they can now work what the potential damage will be. Having deployed the list filter against several versions of SharePoint in the browsers listed above, the following behaviours were noted.

SP Version

IE

Firefox

Chrome

SharePoint 2007

Rendered

Didn’t render

Rendered

SharePoint 2010

Rendered

Didn’t render

Rendered

SharePoint 2013

Rendered

Didn’t render

Rendered

What these notes (as seen in the project forums here) show are that any FireFox user is not likely to see the list filter render to any SharePoint deployment that they may be visiting. As of August 2014 at 24.7% usability, that’s almost 1 in 4 of any user base, which is a significant number. (How to get the script working with Firefox is the companion tutorial for this article).

Moving on from this, knowing what versions of SharePoint the list filter works on is only one part of our journey. As Microsoft ships the product with several different list and library templates it would be easy to assume that if the List Filter works on one, it would work on all of them. To explore this assumption in greater detail, these templates were all tested. Please see the table below for the results. Please note that only a custom list was tested, not each specific list template packaged.

 

 

Template

Rendered

Worked

Custom List

Rendered

Yes

Asset Library

Didn’t render

No

Data Connection Library

Rendered

Yes

Document Library

Rendered

Yes

Form Library

Rendered

Yes

Record Library

Rendered

Yes

Wiki Page Library

Rendered

Yes

 

The last level that we can assess the list filter on is the column level. It provides a great freebie in that you can use it to filter on field types that normally aren’t filterable. This includes calculated columns and notes (multiple lines of text) fields.

Link to SharePointReviews.com product review

Currently there is no entry on http://www.sharepointreviews.com for the Instant List Filter.

“End User – Developer” scale

This tool fits squarely in in the End User part of the “End User – Developer” scale. The list filter is easily deployed to the client with little effort, from which point it pretty much becomes a “fire and forget” solution. There are several other ways to install the solution but the ability to copy and paste the code into a Content Editor Web Part makes this very accessible.

Potential pitfalls / problems

The instant list filter was originally developed for SharePoint 2007. This is the single biggest problem that IT professionals are likely to have with it. It can work with SharePoint 2010 / 2013 though. The issues that you are likely to experience with it are:-

  1. It only filters on returned item count and doesn’t go past pagination. For instance, if you have a list with 3000 items but have set pagination to 100 per page, the list filter only works on those 100 items.
  2. It also doesn’t work on external lists unless modified to do so.
  3. It doesn’t work very well with FireFox unless modified to do so.

Tutorials

Because the list filter is easy enough to get started with, an installation tutorial would be pointless. Instead, what we’ll look at is how to get the script working with FireFox, which appears to be problematic for some users.

Conclusion

When installed and operational the instant list filter looks and feels like it should have been part of the SharePoint product itself. It’s a classy and easy-to-use extension that complements the OOB search tools very well. The ability to filter on traditionally non-filterable field types is a big bonus. It does have its limitations however, with the most potent of these being that it only filters on the rendered page items NOT the entire list.

The links below are my reference list: –

  1. Original CodePlex Project Link: – https://instantlistfilter.codeplex.com/
  2. Jaap Vossers Blog – http://blog.vossers.com/
  3. Business Data List Web Part usage – https://instantlistfilter.codeplex.com/discussions/228167
  4. Visual Upgrade changes – https://instantlistfilter.codeplex.com/discussions/262132
  5. Filtering on just a single column – https://instantlistfilter.codeplex.com/discussions/257825
  6. 2010 Code – https://instantlistfilter.codeplex.com/discussions/49123
  7. W3C Browser Statistics & trends – http://www.w3schools.com/browsers/browsers_stats.asp

Tutorial: Adding a Deep Zoom Image to a SharePoint 2010 Site

In my previous blog entry (part of the CodePlex Corner Series) I mentioned that I’d write a tutorial on how to add a Deep Zoom Image to a SharePoint site with the Seadragon Viewer web part. These are the notes I’d taken when I was playing around it. I’ve tided them up and they will guide you through the process of web part installation, image creation and how to bring these together.

Applies to

  • SharePoint 2010 (All Editions)

Scenario

You’ve got a large image that you want to distribute to some colleagues. But the image size makes it unwieldy to distribute via email. Instead, you’d like to provide an online capability where your users can interact with the image without losing image integrity. An example of Deep Zoom technology in use can be seen on the SharePoint 2013 architecture diagrams. This solution has a few components, namely: –

  • Seadragon Ajax Viewer Web Part (hosted on CodePlex)
  • Deep Zoom Image Composer
  • A large resolution image

Downloading and installing the web part

First we’ll begin by downloading and installing the web part. We won’t worry too much about configuring it at the moment; all we’re concerned with is getting it onto your servers. These steps should be done from one of your WFE Servers: –

  1. Navigate to the Downloads page of the CodePlex project. The SeaDragonViewer.wsp is the recommended download at the top of this page
  2. Create a folder on your C drive called C:\Web Parts and download the WSP file to this directory
  3. Open the SharePoint 2010 Management Shell via Start à All Programs à Microsoft SharePoint 2010 Products à SharePoint 2010 Management Shell. Right-click on this and select the Run as Administrator
  4. Once this has loaded. Run these PowerShell Commands. The first command installs the solution; the second command deploys it and makes it available for selection within your SharePoint installation.
    1. Add-SPSolution “C:\Web Parts\SeaDragonViewer.wsp”
    2. Install-SPSolution –Identity SeaDragonViewer.wsp –WebApplication http://YourSite –GACDeployment

Please note that the http://YourSite should be replaced with the URL of your own SharePoint Web Application. Once these steps have been completed, you’ll have the web part ready and installed for use but no image to plug into it. To prepare these, it’s necessary to step back from SharePoint for a moment and to use another Microsoft Tool; the Deep Zoom Composer

Creating DeepZoom Images for use within SharePoint

In this next set of steps we are going to obtain a high resolution image and use a special image utility to prepare this for use within SharePoint. We will then manually tweak the output of the tool to make sure that it’s compatible with the web part that you downloaded and installed earlier.

  1. On your desktop, create a folder called “Sea Dragon Images”
  2. Next, in your browser of choice navigate to morguefile.com. This is a free photo archive that you can use images fairly freely from.
  3. In the search box, type in London and hit enter
  4. Pick an image on the search results page and click on it. You’ll get a properties box that describes the attributes of the file you’ve chosen
  5. Click on the Download button on this attributes page.
  6. This will prompt you to open the file, save it or to cancel the download. Click on “Save” and save it to the Sea Dragon Images folder that you made earlier

At this point, you should now have a folder with one high resolution image contained with it. To make use of this image we are going to install a piece of kit called the Deep Zoom Composer. This is a facility that takes high resolution images and then transforms them into the appropriate format.

  1. Download the DeepZoom Composer from http://www.microsoft.com/en-us/download/details.aspx?id=24819
  2. The download process is quick and painless. Double click the exe and start the installation process. Accept the terms and conditions and follow the wizard through to completion
  3. Launch the Deep Zoom Composer from the start menu. Start à All Programs à Microsoft Expression à Deep Zoom Composer. You’ll be greeted with this screen
  4. Click on New Project
  5. In the New Project Dialog Box that pops up, name the project “London” and save it to the Sea Dragon Images directory that you created earlier and click OK
  6. With these settings in place, the dialog box will disappear and you’ll see a blank canvas. This has also created a London directory within the Sea Dragon Images directory that you will be investigating later
  7. Back on the canvas, look at the top right of the Zoom Composer and you’ll see an “Add Image” button
  8. Click on this and then navigate to the image that you downloaded earlier. Select it and press Ok. You’ll then see the image selected at the centre of the canvas and on the right hand side of the screen under a thumbnail strip
  9. On the toolbar at the top of the page, click Compose
  10. This will take you to the second stage of the composition process. You will see a blank canvas again but this have the London image from the previous step loaded in the thumbnail strip at the bottom of the screen
  11. Drag the London image from the thumbnail to the canvas. It is beneficial here to use the “Fit to Scree” command to make this easier. Do this via
    1. Edit à Fit to Screen
    2. Keyboard Shortcut: Ctrl + O
  12. Once this is done, you should have a screen that looks similar to the below
  13. Click on the Export Tab
  14. This will take you to a new export page where the various export settings can be inspected. On the export settings on the right hand side of the screen select Seadragon Ajax from the Output type options.
  15. Give your export a name and select the export location. By default this will be a folder called “Export Data” within the project directory that was created when the project was initialised
  16. Click Export once you are happy with the settings. You’ll see these options at the end of export process
  17. Click “Preview in Browser” to see how this will look in your SharePoint site
  18. Once you’ve done inspecting your work in the browser, click on the View Image Folder. You’ll see something similar to the image below. The file path will be …/Exported Data/London/GeneratedImages

Let’s inspect these files before moving on. Some changes will be needed to them shortly but it always helps to know what these are before altering them

File / Directory Name

Notes

Dzc_output_files

Directory containing the zoom images

Dzc_output.xml

XML file that dictates the zoom template size and format

Scene.xml

XML file containing the instructions and calculations for the images

SparseImageSceneGraph.xml

XML file that stipulates the zoom ratio, image path and background colours

 

The two items that we want to pay attention to here are the dzc_output_files directory and the dzc_output.xml. These are the files that the Seadragon Viewer web part needs to talk to. These next steps will show you how to combine your image output and the web part.

  1. In the Generated Images directory generated by the Deep Zoom Composer rename the dzc_output_files directory and the dzc_output.xml to London.
  2. Once these files have been renamed upload the entire directory and the xml files to a SharePoint document library. Right click the London.XML file and copy the shortcut
  3. Back in your SharePoint environment, navigate to the root site of the web application that the web part was installed to
  4. Access the Site Collection Features via Site Actions à Settings. This will load a new screen
  5. On this new screen, look for the Site Collection Administration heading and click on the Site Collection Features under it. This will also load a new page
  6. On this page, search for the SeaDragonViewer Feature1 and activate it. This adds the web part to the web part gallery for all sites within this site collection
  7. Now that the part is available, navigate to the page or site where the Seadragon viewer is to be added. When selecting the web part it will be grouped under the Innovation category
  8. Once the web part has been added, enter the configuration options (Edit Page à Edit Web Part) and look for the miscellaneous section. This will have three configuration options: –
    1. XMLPath: This is where the URL for the renamed XML file needs to be placed
    2. WPWidth: Setting for the Web Part Width
    3. WPHeight: Setting for the Web Part Height
  9. Paste the link of the XML file that you copied earlier into the XML Path field and press Apply / OK
  10. You will now have a web part with a high resolution image that you can zoom into and pan around without any loss of quality

That’s

The CodePlex Corner: Seadragon Viewer Web Part

The link to the Project is https://spseadragon.codeplex.com/

The CodePlex project that I want to look at for this column is something that was originally created by Microsoft Live Labs. It goes by the name of Seadragon and is a facility that allows a user to perform a “Deep Zoom” on an image. Don’t worry if that is an unfamiliar term, we’ll explore the concept shortly. Whilst Seadragon was initially a Silverlight project, a separate work stream produced a web based version known as Seadragon Ajax. Ultimately the team disbanded and the project fell into abandon. This year a SharePoint Seadragon Viewer web part emerged, which has been developed by Nikolas Charlebois-Laprade.

A short explanation of Deep Zooming is that it is a technology designed to allow efficient viewing and transmission of images. It consequently works very well with high resolution images. This is achieved this by breaking up an image into several smaller pieces. Essentially a pyramid of smaller and lower resolution images is created from the original item. The starting image is lowest in the pyramid. When zooming in for sections, you’ll be zooming into one of the tiles from these tile sets, moving between sets as required.

Believe it or not, it’s something that you’ve probably seen before. If you’re not convinced, take a look at the architecture design pages for SharePoint 2013. See that zooming ability? That’s what the Seadragon Viewer does. It makes large and typically unwieldy images much easier to interact with.

When we look at how this works within SharePoint, making the web part work can be broken down into two specific areas: –

  1. Pre-SharePoint work section: the creation of images and their properties with the Deep Zoom Composer
  2. SharePoint Configuration: The installation of the web part and how to use Deep Zoom images with the web part

It’s outside the scope of this review article to explain all of this in great detail but I am writing a tutorial on this, which I’ll post shortly.

Link to SharePointReviews.com product review

There are currently no product reviews on SharePoint Reviews for Seadragon Ajax. I may add one eventually but as this is only a basic web part and not a fully-fledged solution I think it would be unfair to add one so soon. I’d file this under Content Management à Content Organisation

“End User – Developer” scale

On first glance this is just a standard web part deployment and installation. There is however, a fair amount of work to be done to prepare images for Deep Zooming. For that reason, I’m rating this squarely between the administrator / developer spokes.

Potential pitfalls / problems

This is a web part that makes you work a little to get the most out of it. As Seadragon and Deep Zooming were never developed with SharePoint in mind, getting the two married together can be an awkward process. I can see two potential pitfalls: –

  1. Learning to use the Deep Zoom Image Composer
  2. Setting up the XML and file structure within a Document Library

Using the Deep Zoom Composer

: This was originally created as part of the Microsoft Expression Suite but was offered for free rather than being part of the (at the time) paid offering. Installing it is straight forward enough and exporting the image is a three step process. You’ll just have to remember to output the files as Seadragon Ajax.

Linking it all to the web part

: The web part works by communicating with the XML file that is output from the Deep Zoom Viewer. This will involve renaming the output XML file and the image directory so that they have the same name. Not a technically challenging step but an easy one to overlook.

This is a project that I liked reviewing and it’s one that I’ll definitely get some use out of in various SharePoint projects. Seadragon is a technology that, when bolted in SharePoint is surprisingly industry agnostic. It’ll have a use anywhere that a high resolution image can serve a purpose. Being able to surface this within SharePoint sites seamlessly

The links below are my reference list: –

  1. CodePlex Seadragon Viewer Web Part
  2. Nik’s Blog Entry on the SeaDragon WebPart
  3. Expression Gallery SeaDragon Ajax
  4. SharePoint 2013 Architecture diagrams
  5. Deep Zoom Silverlight Developer Info
  6. MSDN Blog: Deep Zoom Primer (Jamie Rodriquez)
  7. Download link to the Deep Zoom Composer