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
- Create a Links List
- Create a Managed Property and Start a Full Crawl
- Create a Display Template
- Create a Result Type
- 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
- Navigate to a SharePoint site of your choice.
From the gear menu in the upper-right of the page, click "Add an
- Select the Links app, give it a name, and click
- 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.
- Navigate to your Search Service Application within Central Administration.
In the left navigation, click "Search Schema."
Click "New Managed Property."
Fill out the form as shown in the list below. If not specified, there's no
need to change the field.
- Property name: owsURL
- Retrievable: Yes – check this box
- Safe: Yes – check this box
- Mappings to crawled properties: ows_URL
- Click OK
In the left navigation, click "Content Sources."
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).
- 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
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
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.
- Navigate to the top-level site of your SharePoint site collection that
contains your links list.
From the gear menu in the upper-right of the page, click "Site
Under "Web Designer Galleries," click "Master pages and page
- Click on the "Display Templates" folder.
- Click on the Search folder.
- Download Item_Default.html. Leave your browser open as
you'll come back to it.
- 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.
- Open Item_Link.html in your favorite text editor.
Replace all content in Item_Link.html with the code in the file I've linked
Eric's copy of Item_Link.html on
- Save Item_Link.html.
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.
- 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.
- From the gear menu in the upper-right of the page, click "Site
Under the "Site Collection Administration" heading, click
"Search Result Types."
- Click "New Result Type."
Fill out the form as shown in the list below. If not specified, there's no
need to change the field.
- Give it a name: Link
- Which source should results match?: "Local SharePoint
Open the "Show more conditions" section, and configure
this section as shown below.
- "Equals any of…"
Within the Actions section, open the "What should
these results look like?" drop-down menu and choose "Link
- Click Save
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
- Navigate to the search center.
- 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.
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.
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!
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."
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.
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.
At least they're sorted alphabetically now, right? :-)
First, refer to this post: http://social.technet.microsoft.com/Forums/sharepoint/en-US/63d614a1-258d-4efc-a4c5-88b7f3422df3/adding-a-new-font-to-the-list-of-available-fonts?forum=sharepointadminprevious.
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.
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:
Add the style to the site collection's default master page.
Create your own custom CSS file, add the style to it, and have your site collection's default master page reference your CSS file.
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.
I was recently working in a customer’s Office 365
tenant and was able to access all parts of the tenant except:
- The SharePoint Online Admin Center
- 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.
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
Figure 1: The in-list filter/search box of a custom
Figure 2: Entering a term and seeing only results for
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.
- Announcements List
- Calendar List (“All Events” view)
- Contacts List
- Content and Structure Reports List
- Custom List
- Document Library
- Forms Library
- Issue Tracking List
- Links List
- Picture Library
- Promoted Links List (“All Promoted Links” view)
- Reusable Content List
- Site Assets Library
- Site Collection Documents Library
- Site Collection Images Library
- Site Pages Library
- Style Library
- Tasks List
- Workflow Tasks
Do not allow in-list
- Discussion Board List
- MicroFeed List
- Survey List
- Wiki Pages Library
As a workaround, I recommend adding a
filter/search web part to a custom page that would provide such functionality.
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.
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.”
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.
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
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
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
The style of this view is “Default” and looks as expected.
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: http://sdrv.ms/1emlSMD.
Here’s the link that led me to it: http://www.eliostruyf.com/display-the-title-row-top-navigation-in-the-search-centers-of-sharepoint-2013/ 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.
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
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.