Eric Skaggs - Home

Aug 11
SharePoint 2013 – Link Display Template for Search Results


It's odd, but SharePoint handles links in search results differently than you might expect. To clarify, I'm talking about those items that have a content type of "Link," meaning they're typically in a Links list a SharePoint site. By default, links will be displayed in search results just fine, but when you click on one, you're taken to the display form of the link within the Links list instead of the actual destination of the link.


Most of the customers I've worked with would much rather click on the link and go directly to the link, instead of having to first go to the display form, then click on the link again to finally get to it. Of course, I agree with that and that's the purpose of this post. Let's walk through how to create a custom display template specifically for "Link" items in a SharePoint 2013 environment.


Overview of solution steps

  1. Create a Links List
  2. Create a Managed Property and Start a Full Crawl
  3. Create a Display Template
  4. Create a Result Type
  5. Test Your Search Results

Create a Links List

This is necessary to ensure that you have some content to crawl in the next step. You need to have at least one links list with at least one link in it to continue. If you already meet this requirement, you can skip to the next section, "Create a New Managed Property." Follow the steps below to create a new links list.

  1. Navigate to a SharePoint site of your choice.
  2. From the gear menu in the upper-right of the page, click "Add an app."

  3. Select the Links app, give it a name, and click Create.
  4. Add a couple of links to the list. It's a good idea to give them different names and URLs so that you can easily differentiate between them while testing. Also, it's nice if they're working links, so be sure to use working URLs.

Create a New Managed Property and Start a Full Crawl

The crawled property that contains the actual URL of a link is ows_URL. This crawled property is already mapped to an existing managed property called OWS_URL. However, if you attempt to reference OWS_URL in your display template, you'll only get "undefined" as a return value because the OWS_URL managed property is not marked as "Retrievable" in the search schema within Central Administration. When I tried to edit the OWS_URL managed property and mark it as retrievable, I received a message stating: "The settings could not be saved because of an internal error: The managed property "OWS_URL" has an invalid name: The following invalid characters were used: '_'."

Welcome to SharePoint. This is a built-in managed property with an underscore in the name, yet SharePoint won't allow you to update it through the GUI because it has an underscore in the name. Confused? Me too. Don't waste any more time on this and move on to create your own managed property.

I decided to create my own managed property to avoid tampering with the built-in one since SharePoint typically doesn't like it when you change anything that's there by default. I created a new managed property called owsURL, mapped the ows_URL crawled property to it, and then ran a full crawl. Running a full crawl is necessary for the change to take effect. Follow the steps below to create the new managed property and start a full crawl.

  1. Navigate to your Search Service Application within Central Administration.
  2. In the left navigation, click "Search Schema."

  3. Click "New Managed Property."

  4. Fill out the form as shown in the list below. If not specified, there's no need to change the field.
    1. Property name: owsURL
    2. Retrievable: Yes – check this box
    3. Safe: Yes – check this box
    4. Mappings to crawled properties: ows_URL
    5. Click OK
  5. In the left navigation, click "Content Sources."

  6. Now we'll start a full crawl on the content source. Starting a full crawl can put a load on your server(s) and cause a degradation in SharePoint's responsiveness. It's advisable to perform this step after hours when users are not interacting with the system. Hover over the "Local SharePoint sites" content source, open its drop-down menu, and then click "Start Full Crawl." (I'm assuming this is the correct content source. You'll want to start the full crawl on the content source that contains your newly created Links list).

  7. You'll get a prompt asking "Are you sure you want to start a Full Crawl?" If you're comfortable with the potential performance impact to your users, then click OK.

Depending on how much content you have, the full crawl can take minutes or hours. While the crawl runs, you can move on to the next section and create the display template.

Create a Display Template

The display template controls how the search result looks and behaves. Follow the steps below to create a new display template.

  1. Navigate to the top-level site of your SharePoint site collection that contains your links list.
  2. From the gear menu in the upper-right of the page, click "Site settings."

  3. Under "Web Designer Galleries," click "Master pages and page layouts."

  4. Click on the "Display Templates" folder.
  5. Click on the Search folder.
  6. Download Item_Default.html. Leave your browser open as you'll come back to it.
  7. It's not recommended to change Item_Default.html itself because it's a default file included with SharePoint. Instead, rename your local copy of Item_Default.html to Item_Link.html and customize that going forward. This is the recommended name only because it matches the naming convention used by the other display templates. If you want to make this stand out as a customization, I recommend adding a prefix for your company name. For example, I might call mine Catapult_Item_Link.html or something similar. You can name it whatever you like.
  8. Open Item_Link.html in your favorite text editor.
  9. Replace all content in Item_Link.html with the code in the file I've linked to below.

    Eric's copy of Item_Link.html on OneDrive

  10. Save Item_Link.html.
  11. Switch back to your browser and upload Item_Link.html to the Search Display Templates folder. You'll see it appear in the list there under Item_Excel_HoverPanel.html. You should also see Item_Link.js appear. This file is automatically generated by SharePoint and you never have to touch it, so don't. J

With that, you're done with the display template and ready to move on to the next section to create a result type.

Create a Result Type

Why is this necessary? Well, technically it's not, but I don't want my custom display template that I created specifically for links to be used for anything else because that would cause some confusion. The result type maps the type of search result to a particular display template. In this case, I want all search results that have a content type of "Link" to use my "Link Item" display template. Follow the steps below to create a result type.

  1. Navigate to the top-level site of your SharePoint site collection in which you'll be searching. This could be a stand-alone search site collection or a content site collection that has a search site within it. Either way, it's best to navigate to the top-level site.
  2. From the gear menu in the upper-right of the page, click "Site settings."
  3. Under the "Site Collection Administration" heading, click "Search Result Types."

  4. Click "New Result Type."
  5. Fill out the form as shown in the list below. If not specified, there's no need to change the field.
    1. Give it a name: Link
    2. Which source should results match?: "Local SharePoint Results"
    3. Open the "Show more conditions" section, and configure this section as shown below.
      1. ContentType
      2. "Equals any of…"
      3. Link

    4. Within the Actions section, open the "What should these results look like?" drop-down menu and choose "Link Item."

    5. Click Save
  6. You should be taken back to the "Manage Result Types" page where you can now see your newly created result type near the top under the "Defined for this site collection" heading.

With all that hard work done, you're ready to move on to the next step and Test Your Search Results.

Test Your Search Results

  1. Navigate to the search center.
  2. Enter a query that will return an item whose content type is Link. If you're having trouble finding any, you can search for "ContentType:Link" and you're guaranteed to get one if you have any.
  3. Verify that your search results are displaying the correct URLs visually as well as functionally. That is, you should both see the correct link and be taken to it when you click on a search result.


Aug 05
Phoenix Office 365 User Group
I’m working on starting up the Phoenix Office 365 User Group.  As implied, this will be a user group in Phoenix with a focus on all the wonderful things that make up Office 365!

I’d like to point out that this user group has never met and is still just a concept in my head, but I’m working on building out collateral and nailing down the logistics.  That said, if you’re in the Phoenix area and think you might be interested in attending sessions, I’d love your input on where, when, and how often we should meet.  Additionally, if there are any particular topics you’d like to learn about or if you’d like to speak, let me know!
Until this user group takes off, chances are that we’ll meet at the Catapult Systems in Phoenix once per month, starting in late August or September.  Everything is subject to change, but we’ll get it all figured out before too long.
I’m excited about unifying the Office 365 community in Phoenix!
Have input?  Reach out to me directly:
Follow the group on Twitter:  Phoenix Office 365 User Group
Join the group on LinkedIn:  Phoenix Office 365 User Group
Join the group on Meetup:  Phoenix Office 365 User Group
Visit the group’s Microsoft Azure website (Office 365 site coming soon):  Phoenix Office 365 User Group
Jul 24
SharePoint 2013 - Unable to Upload Multiple Files

​This one's always a silly little configuration problem, but there's a quick and easy fix:  Install the Desktop Experience feature on your SharePoint server.

This may require a restart, so plan accordingly.

Without this feature installed, you'll see something like the image below that says: "We're having a problem opening this location in File Explorer. Add this web site to your Trusted Sites list and try again."


Jul 21
The Future of the SharePoint Conference

Today Microsoft announced "Microsoft’s unified technology event for enterprises​," which brings together SharePoint, Exchange, Lync, Project, and Office 365.  The event is in Chicago and runs the full work week of May 4th through 8th in 2015.

SharePoint touches a variety of other Microsoft products and it makes sense to bring the people behind the products together at one large event.  I'm excited about it and hope to attend an amazing event in my hometown.


Jun 23
SharePoint 2013 Missing Arial Font


​A client was recently upgraded from SharePoint 2010 to SharePoint 2013 and noticed that, by default, the Arial font option is no longer available in the font drop-down list of the "Format Text" tab in the ribbon when interacting with the rich text editor.  This is odd because it was present in SharePoint 2010.

SharePoint 2010


SharePoint 2013


At least they're sorted alphabetically now, right?  :-)


First, refer to this post:

Following this post, I was able to get Arial added back to the list.  At the most basic level, I just added the following CSS to a Content Editor web part on one page.

<style type="text/css">
     -ms-name: "Arial";
     font-family: "Arial";

Note:  The "20" of the "ms-rteFontFace-20" class name is to avoid interference with other already-defined such classes.  Increase/decrease the number as appropriate.  Higher numbers are likely safer.

While that will solve this problem for one page, you probably want it to affect an entire site collection, in which case you can:

  1. Add the style to the site collection's default master page.
  2. Create your own custom CSS file, add the style to it, and have your site collection's default master page reference your CSS file.
  3. Create your own custom CSS file, add the style to it, turn on the site collection's Publishing Infrastructure feature, then reference your CSS file through the site's master page settings.






Jun 16
Hyperlinks Report in SharePoint Designer 2013

If you've been having a hard time finding the Hyperlinks report in SharePoint Designer 2013, you're not alone.  Up until now, I thought it was removed from the product!  Thanks to Heather Masters for pointing this out.  The steps below will get you to the report.

  1. With a SharePoint site open, find and edit a page.
  2. With the page in edit mode, you should now see the View tab appear in the ribbon.
  3. Click on the View tab.
  4. In the "Task Panes" drop-down list, click Hyperlinks.
  5. The report will build itself in a few seconds.
Mar 11
Unable to Access SharePoint Online Admin Center in Office 365

I was recently working in a customer’s Office 365 tenant and was able to access all parts of the tenant except:

  1. The SharePoint Online Admin Center
  2. Any of the SharePoint sites

On another computer, everything was working fine.  I use my computer for all sorts of things and have to change settings from time to time, so I figured it had something to do with my settings.

To keep a long story short, I had to disable IPv6 on my wireless adapter.  I’m not sure why this made a difference, but as soon as I did it, the site came up instantly.

It’s possible this could be related to Hyper-V and all the virtual switches I have on my machine; I’m not sure.  I do know that I’ve had problems with other devices and applications due to the proliferation of virtual switches caused by Hyper-V.


Dec 03
SharePoint 2013 and “In-List” Filters/Searches

Most list types in SharePoint 2013 natively provide the ability to find content within the current list.  As an example, I’ve created a custom list called “Countries” and you can see the search box here that allows me to filter or search for a specific country from within the list.  This is handy and prevents me from doing an actual “search” using the site search box and receiving all results related to one country from the entire search index.

Figure 1:  The in-list filter/search box of a custom list.

Figure 2:  Entering a term and seeing only results for that term

However, this capability is not available in every list type.  In fact, there are four list types that do not allow this natively.  For your reference, here are all of the list types broken down by those that do and do not allow in-list filtering/searching.

Allow in-list filtering/searching

  1. Announcements List
  2. Calendar List (“All Events” view)
  3. Contacts List
  4. Content and Structure Reports List
  5. Custom List
  6. Document Library
  7. Forms Library
  8. Issue Tracking List
  9. Links List
  10. Picture Library
  11. Promoted Links List (“All Promoted Links” view)
  12. Reusable Content List
  13. Site Assets Library
  14. Site Collection Documents Library
  15. Site Collection Images Library
  16. Site Pages Library
  17. Style Library
  18. Tasks List
  19. Workflow Tasks List

Do not allow in-list filtering/searching

  1. Discussion Board List
  2. MicroFeed List
  3. Survey List
  4. Wiki Pages Library

As a workaround, I recommend adding a filter/search web part to a custom page that would provide such functionality.

Update:  12/10/2013

It turns out that this is based on the default view of the list and its corresponding “Style” in some cases.  From what I’ve been able to determine, setting the style of a view to “Default” tends to bring back the in-list filter box.

  1. The default view of a Discussion Board is “Subject,” which doesn’t allow you to change the style.  However, a Discussion Board list comes with a view called “Management” that does include the in-list filter box by default.  Simply switch to that view and you’ll see it.  Of course, you can create your own custom view that includes the in-list filter box…just be sure the style of the view is “Default.”

  2. The default view of the Microfeed list is “All Items” and the style is “Default,” but it still does not include the in-list filter box.  I created my own standard view, ensured the style was “Default” and still had no in-list filter box.  In fact, I tried all of the styles for the Microfeed list.  The in-list filter box is just not available here.

  3. The default view of the Survey list is “Overview” and there is no link anywhere to create or modify views for the Survey list.  I did find that you can still get to the “Create View” page by manually navigating to “http://PasterYourSiteUrlHere/_layouts/15/ViewNew.aspx?List=PasteYourSurveyListGuidHere.”  I created my own standard view, ensure the style was “Default” and still had no in-list filter box.  In fact, my new view looked exactly like the default “Overview” view.  The in-list filter box is just not available here.

  4. The default view of the Wiki Page library is the “Home” page of the Wiki.  When you click on the library, it knows to bring up the home page instead of take you to the list of all pages.  You can easily get to the list of all pages that includes the in-list filter box by navigating to “http://PasteTheFullUrlOfYourWikiLibraryHere/Forms/AllPages.aspx.”  The style of this view is “Default” and looks as expected.

Nov 22
SharePoint 2013 - Show Navigation on Search Result Pages

It’s often frustrating to be in a search center somewhere and not have the ability to get back to whatever portal you came from.  Here’s a handy web part (.dwp file) for search result pages in SharePoint 2013 that displays the site navigation:

Here’s the link that led me to it: by @eliostruyf.

While the before/after below is from different sites, I think it illustrates the point. If you add the web part to the web part gallery, it’s a one-time configuration and add so you don’t always have to upload to each page individually. I also found that it needs to be placed above all other web parts on the page to function correctly.





Nov 18
SkyDrive Pro: “We can’t connect to the specified SharePoint site…”

The Problem SkyDriveLogo

I have a personal Microsoft account and an organizational Microsoft account for work.  I log into my work machine with my personal account and Office 365 with my organizational account.  Recently SkyDrive Pro kept prompting me for credentials and was refusing to sync content with my libraries in various Office 365 sites.

“We can’t connect to the specified SharePoint site…”

Ok…weird.  You were connected last week and I’ve got about 200MB of content synced from over the course of the past 3 months.  What gives?

The Solution

I was logged into Microsoft Office with my personal account.  When I opened Word, for example, in the upper-right corner it listed my personal email.  I clicked “Switch Account” and logged into Office with my organizational account.  At that point, I tried to sync some of my libraries from Office 365 and it was finally successful.


(this is my organizational account…the important thing to note here is the “Switch Account” link)

I’m not sure how things changed, but this was the fix that worked for me.  I couldn’t find anything quickly anywhere that mentioned doing this.  Cool?  Cool.

1 - 10Next