Background image

Killer Visuals with SharePoint Search & Display Templates

default post thumbnails default post thumbnails

I had the chance to travel to multiple SharePoint User Groups in just a week and present my session on using Search to build solutions, I am a big fan of the new Search in SharePoint 2013. My last stop brought me to Boston where I presented to a packed room and lucky enough, someone had a video recorder!. If you are interested in building your own Display Templates to make your SharePoint Search Results look good, I encourage you to follow this session along with my step by step articles.

Here you can find more to help you get started, from the slides to guides and downloads:

Use SharePoint 2013’s Search Options to build Display Templates: Make your Search Results Look Awesome

Ben: Good evening, everyone. How’s everybody doing?

Audience: Good.

Man: Spiffing.

Ben: Spiffing. So I’m French, so I can’t do those big words. I don’t know what they mean. Thanks for coming. This is really, really awesome. First, my name is Benjamin Niaulin and I come from Canada. I am French. So there are two things when I say this. If my demo crashes, I am French. All right? So it’s okay. I actually said this because I use this all the time and it actually works. If I send out a newsletter, let’s say, to 20,000 people, and there are spelling mistakes, well now, I can say, “I’m French.” “Oh, don’t worry about it, Ben. No worries.” All right. So I really have it easy for that.

What I want to talk to you about today is…the session is called Build Killer Visuals with Search and Display Templates. “Killer visuals” was really to sell the session. What it really is about, it’s I want to give you some ideas about SharePoint and search because I’m a big, big, big fan of search and what you can do with it, how you can drive new solutions in SharePoint. So instead of having tons of team sites and making people go through each individual team sites, instead, I want to bring the content from these multiple team sites into one place, for example, using search and displaying it the way that I want.

You’ll know one thing. Not only am I French…and I’m going to say this multiple times during this session. There is one very, very important factor at the core of my being, and it is the reason why I went into IT. Believe it or not, I studied finance. I studied finance, but then my uncle told me, “You know, Ben, in IT we build things to automate so that you don’t have to do it yourself.” And at the core of my being, I am lazy. That is the definition of Benjamin Niaulin. I am extremely lazy. So when he said, “You automate.” I’m like, “All right. I’m in.” And I went into IT.

Then, because I’m an Active Directory, SCCM and SCOM guy…I’m not a scum. It’s for System Center Operations Manager. That sounded bad. And actually what happened is somebody told me, “Ben, there’s this thing coming out.” It was back in the late SharePoint 2003, SharePoint 2007, so it wasn’t really coming out. But they told me there is this platform that allows us to delegate to power users so you work even less. Whoa. I’m specializing in that one. And here I am.

Today, I’ve been very specialized in this platform. You can talk to me. This is really where you can contact me, questions, any time. I try my best. So I work for Sharegate. I should just say that, SharePoint migration tool, free for 15 days. Awesome. All right. That’s it. Yeah, that’s it. There’s the blog though. I write a lot of content, as much as I can, especially on search, these days. And it doesn’t talk about the product. It doesn’t talk about how to migrate. It’s really a general blog. So I invite you to come and check it out. That would be awesome.

Okay. How do we get here? But first, why do I want to get here? My objective is, and you guys work with SharePoint probably. You worked as either consultants or in a company. And what is the first thing you build in SharePoint? Any ideas?

Ben: You guys are going way too technical. The first thing you build is the weather web part, right? The second thing you build is the carousel and the slider, however you want it. Why? Because people like to see these things. They like to see the information, and they like it to be pretty. “The prettiest picture wins the funding,” is the saying, I think. It could be just a French saying. I don’t know. But the idea is how do I get to something that looks good, right? So I have here tiles that…it doesn’t matter. These are responsive so they are just based on the device in which I’m accessing information in SharePoint. But the idea is how do I make this or a circular navigation that you see at the bottom? And why would I even bother with this, right? We were asking why. Again, what am I, besides French?

Audience: Lazy.

Ben: You guys are awesome. I am lazy. So before, in 2007, 2010, what would I do? Well, of course, a customer would ask me, “Can you make a carousel for us?” “Yeah. Absolutely.” So I would build a carousel, the slider. And back then, I probably wasn’t as good. So what happened is I would give them a solution. I’m not a developer, right? Some people call me a developer because I do HTML, right? Where’s Joel? He always says, “You’re a developer,” because I do HTML and CSS. Uh-oh. Developers will not be happy to hear that. I am not a developer, and I do my best to do everything with SharePoint as long as I can without calling one of my developers, right? It’s not because I don’t want to deal with them. It’s simply because I usually have 1 or 2 and we have 5000 people to take care of. They got really a lot to do. And it doesn’t take two seconds to build a solution then deploy it, making sure it works and all of that. It takes a long time. So I try to do as much as I can with no code solutions.

So usually what would I do to get something that looks good, a slider or tiles that are responsive? I would build it, and then it would work in one place, right? It would work on this specific page because I use either SharePoint Designer or I put the code directly in there. So it would work only in one place. And the problem with it is that it only worked with that specific list or that specific document library. Of course I could move it around somewhere, but it wasn’t always easy. I couldn’t say, “Hey, you see these tiles up there?” Right? I couldn’t say, “This is going to work with a task list and it’s going to show tasks,” and then flip it and say, “This is going to work with a document library and an image library.” It didn’t really work like that. I had to really recode it almost. And by coding, I mean, HTML, CSS, and of course, XSLT back in the days. Right?

So how do we get there? And this is the goal of the session is how do we build these things but by being lazy, right? Productive lazy. That means I build it once, then I go for SharePoint, and it’s reusable. Everybody can use it. That’s my objective, to always automate stuff so that other people can work, right?

And I’m not really lazy, guys. It’s just an example. But basically what I want to do is how do I get it so that instead of building it every single time for every specific scenario, how do I build it once and then whatever you choose to use, to show inside of these tiles…maybe you want to use it. You want to put it in your team slide, save the team slide as a template so that it shows the tasks of the current user that is logged in that are assigned to him but are not yet completed, right? It will always show that. How do I do that? How do I build this so that it also works for the next guy that wants to show his sites instead of his navigation? How do I build it once so that I don’t have to do that?

Well, guys, first, don’t get too excited. This is my dog, right? Everybody shows pictures of their kids. I don’t have any. I love my dog. Also, he’s going across New England this week. All right. So guys, don’t get too excited because first we need to understand what’s changed in SharePoint 2013. I can almost do his face. So what’s changed in SharePoint? Well, [inaudible 00:08:48]. I should get those shoes. I think they probably make them now. What’s changed in SharePoint 2013, right? A lot of things have changed. What is the biggest thing that…well, I’ve told you that’s name of the session. But what’s the biggest thing that’s changed?

Man: Search.

Ben: Search. Or it’s the one I would say that has the most impact that we actually see. And a lot of the times, people are migrating just because of the search or are leveraging SharePoint 13 search with their 2010 and doing a slow migration into 2013. So obviously search is a big, big, big factor. But I’m not going to talk to you about metadata extraction today. I’m not going to talk to you about, I don’t know, document thumbnails. If you want, we have SharePoint after, I’d be happy to.

But you know what, guys? What’s the one thing you guys remember about what’s new with search? What’s new with search? What’s changed? Everybody said search just now.

Woman: Going fast.

Ben: That’s very technical, but yes. There’s the buzzword “fast.” And then there’s another buzzword.

Man: Slow.

Ben: Awesome. There’s another buzzword. It’s continuous crawl, which I’ll get back to in a few seconds. But first, there’s some new search web parts. There’s the constant content search web part, which I never talk about because it’s only available in Enterprise and is now available on Office 365. It wasn’t for a long time. Why do I never talk about it? Well, because there’s the search results web part that’s free that does exactly the same thing as the content search, everything except one checkbox, which I can talk to you about. But is the checkbox worth going through Enterprise every single time? Anybody work in Microsoft SharePoint Product Team? No? So it’s not necessarily worth going…oh, wait. They’re filming. You better pause that. So basically…

Ben: Yeah. No, the idea is it’s not the only justification. I don’t want to tell my customer, “Hey, we’re going Enterprise. I want the content search web part.” Because eventually we’re like, “Wait a minute. The search results does the exact same thing.” So keep that in mind. And then, of course, fast, which I’m not going to do the quiz of who bought it because there’s not going to be a lot of hands up. Because now it’s free, right? So definitely some big pluses there. It’s not really integrated. They took the best parts or the parts they wanted. They put it in SharePoint 2013.

So these are things that have changed. So obviously, now, this is a big change. And we can trust search a little bit more because how does search work, right? There’s crawling, right? What does that mean? It means there’s something called the search engine and it crawls your SharePoint. It puts what it found in a database and an index file. And then you ask what’s in it, and you ask to show it. Did I get it right? All right.

So now, we’re saying there was a full crawl where you do the whole thing, all the properties, all the new settings. And then there was incremental crawl. What was incremental crawl? Incremental crawl was me. I’m the crawler. And what I do is every 15 minutes, for example, though I work on a schedule…every 15 minutes I have to go through this SharePoint. And imagine SharePoint is this building. It just got built. It’s empty. It takes me five minutes to do the whole building. There’s nobody. So SharePoint just started. There’s nobody really using it. My crawl, I finish it in five minutes. I come back here. What do I do, guys? Take a beer. I enjoy myself. I relax, right? And then in 10 minutes, because it’s going to be 15 minutes, I’m going to have to go again. Every 15 minutes I have to do this. What happens after three months of real SharePoint? It doesn’t take me 15 minutes to go run up and down this building, which is SharePoint. Because now people are using it. Documents are added, deleted, modified versions. Things change. There’s lots of stuff. So I can’t finish in 15 minutes. I finish in three hours, four hours.

People…or what’s the joke, Joel? Users.

Joel: Yeah.

Ben: So guys, take a break. Do you know there are two people that call who they’re serving users? IT and drug dealers. That’s us. It’s bad, isn’t it?

Joel: It is pretty bad.

Ben: So our users are complaining to my boss, the central administrator, central admin guy, SharePoint, “Hey, man, I put documents in SharePoint. Where are they, search? And then it goes beyond search. SharePoint is crap. I don’t like it.” Well, what happened? I put documents. They don’t show up. That’s because search crawl is still running because you did one content source. That’s another problem. But the idea is how do we make that guy that’s gone come back? Because now, it’s been four hours. He’s gone. There’s nothing happening. The new documents are not added. So how do we make it go again? How do we bring him back? Well, continuous crawl.

I like this because I learned about continuous crawl while I was watching Steve Ballmer. He was announcing PowerPoint 2013. I was downloading the beta of Office SharePoint 2013. And what happened is everybody was like, “Continuous crawl.” And like any fool, I thought that what they said is what’s going to be delivered.

So continuous crawl, what could it mean? I thought it would be continuous crawling. But then I could just be French, okay? Continuously crawling. That could only be continuous crawl, but no, it isn’t. What is continuous crawl? It shouldn’t even be called continuous crawl. You know how frequently continuous crawl crawls?

Man: Five minutes.

Ben: Fifteen by default, just like the other one. Continuous crawl continuously crawls, but only every 15 minutes. So what’s the difference? The difference is when you send out the first guy and he didn’t come back in 15 minutes, he hires another one. So now there’s two guys running. So you can call this parallel crawl. And the way he pays the other guy is with your RAM, with your processor, lots of it, right? That’s why I have no [inaudible 00:15:37]…a lot of people activate continuous crawl. I’ve seen this when a lot of consulting companies started installing the first SharePoint 2013, the customers, “Oh yeah, we’ll activate continuous crawl. It’s new. It’s awesome.” No, you don’t just go activate it everywhere. It’s for specific needs. If I’m doing a public website, right, with SharePoint, and I need to things to go on rapidly and be removed rapidly, I’ll make that content source continuously crawled every 15 minutes, right, to make sure that it’s always fresh. But now that we have these and fast is added into the regular incremental crawl, which already makes it a lot better, I can trust search now. In 2010, I didn’t really trust search. Plus, I needed to know XSLT. No, thanks.

So before we start anything today, you need to understand the basics. This looks complicated. It’s my only complicated slide today. You need to understand how search works. And I’m not going to go super technical. This looks technical. Forget the image. It’ll be easy to understand after. Basically, let’s say you created a document library or a list. Everybody okay with me so far? Not too bad? Okay. All right. You’ve created a list or a document library. You create columns. So far so good? All right.

Now, you create a column called company, and you expect people to add items and documents and tag it with the name of the company, say Sharegate. All right. I’m done with product stuff. Now, basically, what happens is you go to the search engine. You type company, two dots, or whatever it means in English, semicolon.

Audience: Colon.

Ben: Colon? So they lied yesterday in Rhode Island.

Woman: That’s Rhode Island.

Joel: They didn’t know.

Man: They’re messing with the French.

Joel: So don’t hold it against them.

Ben: They’re like, “He’s French. He won’t know. He’ll repeat it somewhere else.” So the colon…

Woman: Yeah.

Ben: Yeah? I thought that was…anyway.

Ben: Yeah. Anyway, let’s get back to SharePoint here. So I’m going to search and I say, “Company, two dots, Sharegate.” I expect to have search results. Will we get any? Probably not. You know why? Everybody answered correctly but nobody knows why.

Ben: There was some good stuff in there. I heard mumbling, very good mumbling.

Man: It’s not enough.

Ben: When you click on create column in your ribbon at the top, it’s not actually the best way to create a column, right? Because it creates the column in the list or in the library, and it belongs that list or the library. But something also very important happens. The search only picks it up as a crawled property, right?

Woman: Sorry.

Ben: So basically what happens is the search, any search web part that you use anywhere, search results, content search, refinement, catalog item, whatever web part that is related to the search shows things that are in the search engine will never ever, ever show you things that are inside crawled properties. It will only show you something called managed properties, which I will explain in two seconds.

So what happens is when you click on create column, it just creates the column. When you click on site column or you create a site column, you could do it in 2010. They just didn’t enable this checkbox. In 2013, they enabled it and they called it a new feature. But it’s available in 2010. What happens is when you create a site column, obviously when you add it to a document library, it’s going to create the crawl property, and the search is going to get the crawl property. But on top of that, it’s automatically going to create a managed property for it because it’s a site column. And that’s what you see on the board, on the chart. You see on the left column the name of the column you created, site column you created. In the middle column, you see how it will be crawled. So when the search engine crawls, he’ll put OWLS. I don’t know what it means, but that’s where it is.

Joel: Office…

Ben: You found out?

Joel: What do you mean? I used to use OWLS.

Ben: There we go.

Joel: It was back in 1999.

Ben: Office Windows Services.

Joel: No, Office Web Services.

Ben: Office Web Services.

Ben: Can you give me the _Q?

Woman: Okay. Query.

Man: Query.

Ben: So the _Q could be query. It doesn’t matter. Well, in fact, I never really bothered to look. _Q for me, it means general columns, so a single line of text, choice, lookup, the columns that you always see, those regular columns. They’re going to be OWS, _Q, _the type of column that it is. So if I created an item number column and it was a single line of text, it’ll be a crawled property OWS, _Q, _text, _the name of the column. And then because it was a site column, when the search engine passes, it will automatically create a managed property for it. And basically the OWS passes to the right in capital letters with the type of column in capital letters. So far so good?

So basically whenever you’re going to be using these new web parts, these search web parts, when you’re going to ask the web part, “Please get me everything that’s in this list and show me the column company. Show me their values.” To do that, you’re going to have to say, “Show me company OWS choice, whatever, in your property, in your query.” Does that make sense? You’ll have to ask to show the managed property. And basically what these two are, the crawl property is your content, is your meta-data extracted by the search engine. This could be the URL, the title, the document itself, the path, I said already, the URL, any columns that you’ve done.

The managed property is either you created yourself or it gets created automatically because it was a site column. And a managed property, if you created it yourself, you give it a name. And basically all you do when you create managed properties is you associate which crawled properties are going to belong to it. Does that make sense?

Let me give you an example, a real one. If I have a large SharePoint, some people will create a column called customer. The other one we’ll call it customers. The other one we’ll call it clients. The other one we’ll call it client. The other one we’ll call it company. But it’s all the same column. It’s just we’re so big that people are creating columns with different names, but they’re the same thing. For the search, they’re not the same thing. They’re different columns. They’re different crawled properties. This is where you create a managed property to say all those crawled properties…that’s this managed property called company or customer. Does that make sense? And then you tell the search, “Show me customer.” It’ll show you results from all of those. Okay, guys?

Ever do searches? I did a consulting for a pharmaceutical company. We were talking about that earlier. And basically they have document templates, vacation requests, for example, [inaudible 00:23:18]. And the first header of that document is always the same in every document. It’s just people fill out the template, but the header is always the same. And when you upload it to SharePoint and you search for these documents, they show up as either duplicates. Or the title field window search results is going to be that first line, even though in the document library where I uploaded the document, I modified the property called title. All right. You have the title column. I put something there.

But then when I use the search, it’s showing me the first line of the document. And that’s one of the reasons. It’s because out of the box, there’s already many managed properties. One of them is called title. And title includes…and there’s an order of priority, different crawl properties, one of them is a special thing that says going through the document, going through the PowerPoint, going through the PDF, going through the Word document, take the biggest thing, the first thing that’s important, and put that as a title. Put it in priority, right? Does this make sense so far? This is the basics of search, but they’re complicated. But to do anything else, we need to understand this.

You create this in libraries. You create columns. When the search passes, these are crawled property. You can’t do anything with it, right? If you’ve created a site column, it will automatically create a managed property for that column, which means with manage properties, you can ask search to give you a result for it, give you what’s inside that column for a specific request. “Give me all the documents from this library where company equals Vudu. I changed it up. Everybody okay? Okay. Now, we can get started. I’m kidding. We’re halfway down.

So pop quiz. Pop quiz. What is the pop quiz? If I plan to use a search-related web part to show my content, what kind of property should I use?

Ben: Wow. You guys are awesome. I think that you get it. I think you get it. Now that we get this…I love that picture. We can continue. What’s changed with branding? Quickly, what’s changed with branding? First big one, no more XSLT. That’s a big one. When they said that at the session at SPC, the whole room applauded. So now I can work with HTML, CSS, and JavaScript. You know what’s fun about that? I can go to a bar, not a SharePoint, I can talk to other IT people and they know what I’m talking about. That’s pretty cool. It took me seven years.

So this is a side story. It has nothing to do…we were driving from Montréal. I was driving with Joel, with other people. Was it just your son? And we get to the border.

Joel: Oh, yeah.

Ben: And there was a friendly customs guy…what do you call him?

Joel: Border control.

Ben: Border Control Officer. He says, “What is SharePoint?” And I started laughing. That wasn’t a good idea. Because I’m like, “Oh, man.” Anyway, it was just to relate to the story that now I can talk to people. They know what I’m talking about. Because when I do SharePoint now, I work with HTML, CSS, JavaScript. So when I need help, I can actually ask for help. It’s like, “Hey, how do you do a carousel with HTML, CSS, and JavaScript?” And I will go get it. Instead of saying, “Hey, man, you do XSLT?”

And that brings me to making things look good. And that thing is called display templates in SharePoint 2013. Anybody work with content query web part? That’s it? Okay. I worked a lot with content query web part. You know how you work with SharePoint, you put your things in a site. And then three months later, you go to another site and you expect to be able to show the documents from that first site. And then SharePoint’s like, “No,” right? You got to get the developer. Or if you stayed within the same site collection, you could ask the content query web part to do a live query, right, which, of course, if you had more than one content query web part on the site, your site will slow.

So the content query web part, you do a query, and then the results would come, and then you’d say, “Show them like this.” So query, and then a look, and item style that XSL for the geeks like me. Now, you do a search query, and you don’t ask the list of libraries. You ask the search index whose sole purpose is to organize and classify stuff so you can find it quickly. And then when the results come, you create a display template to make it look good, however you want, using HTML, CSS, JavaScript. And that’s called a display template. So if I create one, whatever the search results come out, it’ll still use the same template. That’s the cool part.

So the basics of it. You see on the right you have a regular search result that you’ve probably seen many times, whether in 2010 or 2013. Everything you’ve seen is a managed property. The search went in that document library and it crawled things. It crawled properties, some hidden that you don’t see. And now he said, “Okay, I’m going to create an HTML.” Are you guys comfortable with that? A div, for example.

I create a block, a div, and then inside of it, I said, “Put that managed property called doc icon over here. Put a managed property called title. Put it over here. Put a managed property called description. Put a managed property called path.” And this is what it’s going to look like, a regular block, right? But I can make it look like the thing on the left. And nobody can tell me what that is. It could be an image library. It could be a task list with an extra column, hyperlink, or picture column. It could be anything. That’s the beauty of the display template. It doesn’t matter what it queries. We don’t care. We build it once. We got a slider, and anybody can use it with any type of content.

Display templates are used everywhere. When you use the search engine, all the colors that you see here, all the different colors are different display templates being used. The beauty of this is using another new thing in 2013 called result types. Within the same results…so you did one query. You said, “Go get me all the PowerPoints.” And it gets you all the PowerPoints. But there’s different kinds of PowerPoints. Some of them are executive PowerPoints. You want to make them look better. So you can say that’s an executive because of the content type, because of a special rule. And you can apply different display template to it within the same results of “Give me all the PowerPoints.” So wherever they are in the results, based on what rule they apply to, condition they meet, you can make it look differently.

How’s the session? Was it okay? You’re asking early. Everybody okay? Good? Life is good? Yeah. Am I boring?

Joel: Was I smart to bring Ben with me on my phone?

Man: Brilliant.

Joel: Yeah.

Ben: All right. We’ll continue. We’ll continue. So I lied. No, everything was not a lie. I said you create a display template, right? I assumed that a display template is a file. A display template is really two files that you got to create, right? So you got the search that does the query and then you got to create a display template. But to build a display template, you need to create two files. One of them is the control. And the other one is the item. There are two files. So you told me you guys were okay with HTML. Let’s test that a little bit. You guys know what a UL or unordered list…? For those that are too shy to say yes or no, a bullets list, right? If you open Word, you create bullets. That’s what I’m talking about. In HTML, we got to say we’re about to start bullets. So we put a tag called UL. It’s an unordered list. And then for every bullet, we say LI for list item.

This is our HTML. Part of that HTML is going to be the blog, the control, that says, “We’re about to start this. This is the container. I’m going to need this CSS. I’m going to need this for what’s about to come.” But then there something that’s going to get repeated, and that’s the list items, the bullets. So I’m going to use the item display template to say how each item that gets repeated is going to look like. It’s as simple as that. How are individual items going to look like? How’s the container going to look like? Things that don’t get repeated, like do I want paging? That’s part of the control. That’s part of the big box. I’m not going to put paging in the item display template. What’s going to happen? Paging is going to appear under every single result. Does this make sense?

Audience: Okay.

Ben: Awesome. So where do I get my inspiration? So this is where I’m supposed to say you should build your own, but let’s not lie to each other. I wouldn’t know where to start a slider. I’m not that good. So I get these websites that are awesome to me. So I mentioned them and I get inspiration from them because they provide the code for testing purposes. Of course I should say you should test this. Do not use this in production, between you and me. So these are very cool websites because they provide the demo live. And then there’s a button. Download the whole thing. This is what I did. Oh, you want to take a picture? The slides are online.

oman: Oh?

Ben: Yeah. Search that, the title of the session, and you’ll find it or my name somewhere.

Man: Is it on SlideShare?

Ben: It’s on SlideShare. Absolutely.

Joel: Mine are on SlideShare as well.

Ben: They didn’t ask.

Joel: You got to be careful. Brian’s here.

Woman: I’m signing up for that one.

Ben: So I got this one from the website. This is the actual website. This is the live demo. I froze it and I took a screenshot. So this is a live…this is what it looks like. This is static. The words are written in the HTML. The images are hardcoded. It’s just regular HTML. But now that SharePoint 2013 uses these, I can leverage them.

So I looked at this. Do you know what this is? This is a bullet list. This is an unordered list, except it’s horizontal. It looks pretty. There’s a list item. These are bullets. I downloaded the code. I looked at the code, and I saw that it was a UL with LI, LI, LI. So I removed the LIs. I took everything else that was the container. And I said, “You, my friend, are…”

Woman: Control.

Ben: “…Control.” You’re getting pretty good at it. Control display template, right? And then I took the LI part of the code that already existed, and I say, “Yu are the item display template.” Because I want you to get repeated. If I have 20 bullets, I want you to get repeated 20 times. If I got three, I don’t want all this. I want to get repeated three times. So far, so good? Yeah?

Man: Can we do it hundreds of times?

Ben: You can go hundreds of times. Of course it’s going to be a scroll to the right quite a bit. But depending on the design that you have…for example, I have another one. It’s a circular navigation. I can do as many times as I can do the circle. Or my favorite, classic, the carousel, right? So the carousel sampling, I took an image library. I told the search, “Crawl the whole thing.” I did a display template that makes it look like this. And as many items that comes for my search query, we’ll just have many bullets and I’ll slide through them.

But let’s see if it actually works, right? I like demos, one of those crazy ones. So I’m going to go to SharePoint. So if the demo breaks, I’m French. So I go here. Demo’s breaking, guys. Let’s refresh the page. Uh-oh. Let’s talk while it’s doing that.

Joel: People are checking the weather or something.

Ben: You know what I’m going to do? Yeah, people are checking the weather.

Woman: It’s going to snow.

Ben: Oh, there it is. It’s working on it. You know what it is? The virtual machine, it’s downloading the service pack or something.

Man: Can you change that, working on it, text?

Ben: I haven’t done it ever.

Man: I just didn’t know if anyone knew.

Ben: I don’t think you can, but…

Ben: All right. It’s working. There it is. So what do I have in front of me, right? Pretty cool. You see these words? They come from my list over here. So now my users can focus on writing content without…here, we get this, an internet. It looks super awesome, right? It looks awesome. You have the content creators, people that write content on pages. Oh, man, do I don’t want to be them. They click on edit page. The page layout is all weird because now they got the ribbon. Now, they got things. They got this block to write content in, right? It’s like we roll out the internet, it looks good, and then we leave. And then nobody creates content because it’s super complicated.

I want to remove that. I want to say, “Look, there’s a list. Click new. There’s a form. Fill out the form. Have a nice day.” I’ll take care of making it look good, right? So using search and cross-site publishing, I’ll take the things from the different lists, I’ll pull them together, and then I’ll show them in an awesome way. If I go back to the homepage, right, and I click on edit page, all it is is a search results web part where I went to the change query. So I do something. I like to look good in front of customers and so on. You could do that, too, in front of the boss, get promotions.

So people assume that all I do out of my weekends is go to SharePoint Saturdays, which is kind of true, but that I just do SharePoint. I breathe SharePoint. Yeah, but I have barbecues. I have friends. I talk to people. Beer, that happens. So basically, I have no idea how to write this. The query is here. It says half quotations, the URL, space, content class, STS list item. How did I know this? Now, I know it by heart. But how did I know this? I have no idea.

Woman: Google.

Ben: No, not even Google. I tricked you guys. When I opened the web part the first time, I was in easy mode or quick mode, right? And then when you guys came, I clicked on advanced, save web part. Because in quick mode, all I really have to do is say, “Go get pages,” or “Go get items matching a content type,” what is the content type. Or I can say, “Go get all the documents, but only for a specific URL.” Or I went to advanced mode and I say, “Only return sites in my search result.” Then you go and you’re like in advanced mode, yeah? I just built this for you guys. But it’s actually pretty easy. So I’m not going to save this because I wouldn’t know how to rebuild it.

And then I told the display template to use my custom display. Cancel. And I have some other ones. I have my circular navigation. We’re at the bottom. You see a super animated plus. You see what this plus here is? This is a search results web part.

Man: What?

Ben: If I click on edit page, it’s a search results web part. But basically, it’s getting query. It queried images. And I said, “Put it here.” And when I click on the item, I go to the item. You know what you could use this for, for example? Putting my task at the bottom. Wherever I am, I click plus, I see task. Because it’s query-based. It’s search. Goosebumps moment. I like SharePoint. What can I say?

And basically what I can do here is I can tell search, “Hey, everything you crawled, including the user profiles, use it to filter the results. Go get all the tasks of the current logged in user, where the department is equal to this, this, this, but not that, and this. And you build your query.” And then whatever comes out as a result, you put in the plus or you put it in the tiles. Or you build this famous slider, right? The slider is reusable. If tomorrow you want to use this with your task list, you can. And I have achieved my ultimate goal, laziness. I have created once. Anybody can use it in any different scenarios with their task list, with their documents, as long as they’ve got a managed property, which is what? What is a managed property?

Joel: It’s awesome.

Man: Site column.

Woman: Site column.

Ben: It could be a site column. And managed property is a property you’ve created that says, “Pick up these crawled properties,” which are your columns essentially, right? So as long as you’ve got a managed property that has a hyperlink to an image, I can use this slider, right?

So this brings me to a very important man in our world today that is going to share with us a new idea. What if you thought about this? A reusable design for search results, right? And he said it.

So guys, thank you. If you have questions…step-by-step articles with all the files that I showed today, the sliders, it’s available for download. The tiles, it’s available for download. I didn’t do the little plus yet, but it’s going to come. Thank you very much. Question?

Woman: Where you do your display templates?

Ben: Dreamweaver.

Woman: Like Notepad?

Ben: Notepad.

Woman: You just copy and paste it into…?

Ben: Yeah. You know where you store your master pages on the _catalogs, master page …

Woman: So you’re not using SharePoint Designer?

Ben: You can. I don’t particularly want to use that.

Woman: So you just go into the file system?

Ben: What?

Woman: Do you go into the file system?

Ben: Well, every site collection gets it created, right? So just like master pages, it gets created based on the template. So there’s a folder always. Under master page, there’s a folder called display templates. And then there’s other folders for the search results display template, and then there’s display templates for the content search web part. Because you can’t use the twin web parts of display templates. You do display templates for the search results web part, or you do display templates for the content search web part, for the filter web part, or for the refinement panel web part. Does that make sense? You could use Notepad, Dreamweaver, SharePoint Designer. You just go to all files. You navigate all catalogs and all that.

Woman: Okay. And if you’re using Office 365, is that something…

Ben: Yeah.. It’s the same thing, no differences. They just added the content search…well, just. It’s been months now, three months. Any other questions? Any questions for Joel as well? Yeah.

Man: Yeah, around the searching. We’ve tried using search for certain solutions, especially on document management. The rolling up aspect of it alone is awesome. But that 15-minute window is killer for users. So they upload a file. No, they don’t see it because it’s uploaded somewhere else. Have you see anything to work around that?

Ben: You need to properly configure search. And I’m not saying it’s properly configured. I’m saying based on this scenario that you have, if you need documents to appear faster than 15 minutes, then you got to create that content source. You got to split content sources. And by default, there’s local SharePoint.

Man: I missed one note. I’m on Office 365.

Ben: Oh. So no. That’s what it’s going to be. Have a nice day.

Man: That’s what I thought, yeah.

Ben: Yeah, that’s it. That’s just what it is. Any other questions? Questions on social, Yammer? Otherwise, they’re going to start doing awesome gift stuff. All right.

Recommended by our team

What did you think of this article?

On-demand Webinar Boost Microsoft 365 adoption and take your organization's cloud maturity to the next level.