Edit Display Templates
Display templates provide markup for search
results and search-related Web Parts in SharePoint 2013. Previous
versions of SharePoint rendered all search results the same, unless you
customized the output with XSL and custom code. Design templates are
small pieces of HTML that search components use to render specific
output by injecting content into the specified templates before
rendering the output.
Consider the page of search results in Figure 20; the search results use three different display templates:
- Template for the person result
- Template for documents by the person
- Template for the standard search results
The easiest way to create display templates is
to copy an existing template, by navigating to the display templates
page in the Design Manager and then copying a display template list
item and attachment. Each display template list item has an attached
HTML file, which contains the markup of the template. You may use
display templates by configuring their use via search settings and
search-related Web Parts (such as the site search box).
Edit Page Layouts
Like master pages, SharePoint 2013 supports creation
of new page layouts via the Design Manager. The following steps
demonstrate creating a new page layout that has an associated content
type and uses an existing master page:
- Open your publishing site.
- Click the gear icon.
- Select the Design Manager menu item.
- Click the link to edit page layouts.
- Click the link to create a new page layout.
- You should see a dialog, like that in Figure 21.
- Give the page layout a name.
- Associate the page layout with a content type and existing master page.
- Once created, you can access the page layout by clicking the name of the page layout in the list.
Similar to master page conversion, you can
preview your new page layout and access the snippets manager. Snippets
for page layouts differ from those in master page creation in that you
may apply page fields, media content, zones, dynamic content, etc.
Publish and Apply Design
The link to publish and apply a design,
from the Design Manager, essentially provides links to the master page
settings page for the current site collection. From this page, you can
apply the master page and assign a specific design channel.
Create Design Package
The last link on the left side of the Design
Manager enables you to complete the last task and package the branding
design for reuse, as described below:
- Open your publishing site.
- Click the gear icon.
- Select the Design Manager menu item.
- Click the link to create a design package.
- Provide the name for your package.
- Check whether you wish to include search configuration (display templates, etc.).
- SharePoint will provide a link to a WSP file.
Once you have completed the generation of the
design package, SharePoint will provide a link to the WSP. The WSP file
is also available in the user solutions gallery for the site collection.