Quantcast
Channel: TechNet Blogs
Viewing all articles
Browse latest Browse all 36188

How to: Create a Site Directory for SharePoint 2013 and Office 365

$
0
0

Back in MOSS 2007, there was an enterprise template called Site Directory which was a site for listing and categorizing important sites in the organization that included different views for categorized sites, top sites, and a site map. Starting with SharePoint 2010, this template was deprecated and no longer available.

Does this mean you cannot have a site directory anymore? No! It doesn’t mean that at all – you just need to use out-of-the-box web parts to create your site directory.  This post will show you how to create your own site directory.

We will be using the search results webpart, so users can search for a site to narrow the results down. This is especially useful if there are a large number of sites in the web application. We will also be copying and modifying an out-of-the-box display template to see the results.

And, another good thing is that when new sites are created, the Result Source automatically picks them up!

NOTE: You need to have an enterprise Search Center for this solution to work.

While there are several articles/posts/blogs on the Internet, this was a solution one of my customers wanted.

  • Download the Item_2LinesNoIcon file to your local machine and rename the file extension to html
  • Go to the Search Center, click on the Gear icon, then choose Site Settings

  • Under Site Collection Administration, choose Site Collection Features

  • Activate the SharePoint Server Publishing Infrastructure feature if it’s not already activated.
    • Note in the screenshot this feature is activated

  • From the Manage Features page, select Site Settings at the top, then select Manage Site Features under Site Actions

  • From the Site Features page, activate the SharePoint Server Publishing feature if it’s not already activated.

  • Go back to Site Settings, under Web Designer Galleries, select Master pages and page layouts

  • Select the Display Templates folder, then the Search folder

  • On the Ribbon, click File, Upload Document, then Browse and select the Item_2LinesNoIcon.html file downloaded earlier then click OK.

  • When the dialog box opens for the Master Page Gallery – Item_2LinesNoIcon.html, make sure the Content Type = Item Display Template and check Search Results box for the Target Control Type (Search) and Save.

  • You’ll now see two (2) files, the Item_2LinesNoIcon.html and Item_2LinesNoIcon.js. Click the Site Contents link.

 

  • On the Site Contents page, click Pages

  • On the Pages page, click Files, click the down arrow next to New Document, then choose Page.

  • On the Create Page, give the directory a title (i.e. Directory), the URL Name will be automatically populated but you can change this, then select (Welcome Page) Search results and click Create

  • Back on the Pages page, check-in the Directory page

  • In the pop-up dialog Check in box, select Major version (publish) and No to retain checkout then click OK

 

  • While still on the Pages library, click the Directory document to open it and it will open a Search site

  • Now to filter this to our sites. Click the Gear icon and choose Edit Page

  • In the Search Results section, click the down arrow and choose Edit Web Part

  • In the Properties for Search Results web part, click Change Query

  • In the Build Your Query dialog screen, Switch to Advanced Mode

 

  • Under Query text, type the following:
  • {searchboxquery}(contentclass:”STS_Site”) path:http://sharepoint.domain.com/*
    • Use the name of your site for the path variable
    • Click the Test Query button

  • Next, select the Sorting heading and choose SPSiteURL Ascending then click OK

 

  • Back at the Properties for Search Results web part, expand Display Templates and select Use a single template to display items and choose the Item_2LinesNoIcon template, then click Apply

  • You should now be able see results in the Search Results web part on the page

  • Click OK to close the web part
  • Check-in the page

  • On the Check In dialog box, add comments if you want then click Continue

  • Now, when users search for a site, it will only return the results based on the query.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  • Finally, if you want a navigation link to the Site Directory page, click the Gear icon and choose Site Settings. Under the Search heading, select Search Settings

  • On the Search Settings page, in the Configuration Search Navigation, click Add Link. In the Navigation Link dialog box, add a Title and either type in the URL of the Directory page or click Browse and select the page from the Pages library then click OK

 

  • Click OK to close the Search Settings page then go back to the Search Center
  • In the Search Center, type a word or phrase to search then view the results

  • Notice the word “Everything” is highlighted showing all results. Now, click the Directory link and only sites that start with BI will be shown.

As I said before, there are many ways to accomplish creating a site directory but this solution doesn’t require any 3rd party tools or utilities.

Resources:

 

 

 

 

 

 


Viewing all articles
Browse latest Browse all 36188

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>