Display template SharePoint Server 2013

Display templates for the Content Search Web Part

You can use the following display templates to change the appearance of content that is shown in a Content Search Web Part. These display template files are located in the Content Web Parts subfolder in the Display Templates folder in the Master Page Gallery.

template-contentsearchwebpart

Display templates for the Refinement Web Part and the Taxonomy Refinement Web Part

You can use the display templates listed in the following table to change the appearance of content that is shown in a Refinement Web Part and a Taxonomy Refinement Web Part. These display template files are located in the Filters subfolder in the Display Templates folder in the Master Page Gallery. Note that there are different display templates for different refiner types.

template-webpart

Display templates for the Search Results Web Part

You can use the display templates in the following table to change the appearance of content shown in a Search Results Web Part. Note that the hover panels for the different result types have separate display templates. These display template files are located in the Search subfolder in the Display Templates folder in the Master Page Gallery.

template-search1
template-search2

Advertisements
New APP created once "Project Functionality" feature is activated.

Activate site Features create APP in Site Contents SharePoint2016

Today I successfully installed SharePoint Server 2016 on-premises overcoming few errors related to prerequisite as per my previous posts.

You can see below previous posts :

  1. Windows Server Appfabric: Installation error SharePoint 2016
  2. Cannot connect to database master at SQL Server at server_name. The database might not exist, or the current user does not have permission to connect to it Error SharePoint 2016
  3. Failed to create configuration database. An exception of type Microsoft.SharePoint.Upgrade. SPUpgrade Exception was thrown. Additional exception information: One or more types failed to load. Please refer to the upgrade log for more details Error SharePoint 2016
  4. Program can’t start because api-ms-win-crt-heap-l1-1-0.dll is missing SharePoint2016
  5. Unable to install Microsoft Information Protection and control Client 2.1 error SharePoint 2016

Here I am very excited to let you know the “SharePoint APP” created in “Site Contents” by activating the “site feature“.

you may take it very easy but its not as simple as to resolve issues sometimes, that time it will help you a lot.

a. “Default APP” once site is created, before activating any feature.

Default APP in Site Contents with no feature activate

Default APP in Site Contents with no feature activate, once site is created

b. New APPs  added in Site Contents  after “Publishing Feature” is activated

New APPs added in Site Contents after

New APPs added in Site Contents after “Publishing Feature” is activated

c. New APPs  added in Site Contents  after “Content Organizer” feature is activated.

New APPs added in Site Contents after

New APPs added in Site Contents after “Content Organizer” feature is activated.

d. New APPs  added in Site Contents  after “Community Site” feature is activated.

Site-Contents-Community-Site-Feature-activate

Site-Contents-Community-Site-Feature-activate

e. New APPs  added in Site Contents  after “Site Feed” feature is activated.

New APPs added in Site Contents after

New APPs added in Site Contents after “Site Feed” feature is activated.

f. New APPs  added in Site Contents  after “Project Functionality” feature is activated.

New APP created once

New APP created once “Project Functionality” feature is activated.

amazon     amazonsp2016  amazonsp2016_2

Save site as a template publishing site SharePoint 2013

We all know that SharePoint doesn’t support saving publishing sites as a template. I don’t recommend doing that anyway as the produced template will have errors and isn’t reliable to be used in production to create new sites off of. However, sometimes as a developer you need to save a publishing site as a template to see how SharePoint packages things. This can help you build your own custom web template which is a neat thing and replaces the need to save a publishing site as template.

Well, since the Save site as a template option is hidden from the publishing sites settings page we all used the following URL to go there directly:

/_layouts/savetmpl.aspx

Or

/_layouts/15/savetmpl.aspx

Well, that is not going to work anymore in SharePoint 2013 if your site is a publishing site or have the publishing features activated.

You basically get that following error:

The “Save site as template” action is not supported on this site.

ErrorSaveSiteAsTemplate

In order to get around this issue you need to update a single property page value in your SPWeb object for the site you are trying to save as a template and you are good to go. The property is called SaveSiteAsTemplateEnabled. We need to set that property to true that’s all.

I will show you how to do that using PowerShell:

# Get a reference to the target site

$web = Get-SPWeb http://Intranet.SWRanger.com/Publishing

# Update the property bage value and set it  to the string value “true”

$web.AllProperties[“SaveSiteAsTemplateEnabled”] = “true”

# Commit the property change to server

$web.Update()

PS_SaveAsTemplateChange

Very simple. Now if you navigate to the Save site as a template page using the URL directly it will show fine and it will allow you to save the site as a template which stores a copy in the Solution gallery of the site collection. Make sure you have enough space in your C drive temp folder because it uses that location as a staging directory.

Unable to save site as template “unexpected error has occurred”

Here we go, it’s been a long time I didn’t publish an article which consist of hardcore troubleshooting! Yes, you are correct. It took some time to resolve but finally the issue has been resolved. This time it’s regarding problem occurring while ‘save site as template’ and how we found the culprit.

Problem description:-

User has raised the problem ticket by mentioning “facing problem while saving the site as template”, additionally the templates are getting saved in the solution gallery but not able to activate it also.

Error message:-

An unexpected error has occurred.

Troubleshoot issues with Microsoft SharePoint Foundation.

Correlation ID: acd95f50-4049-4625-9682-aa93aded118f

Troubleshooting done:-

Further debugging in the SP ULS logs and we found some strange facts which are based on event receivers- please refer below-

SPSolutionExporter: Microsoft.SharePoint.SPException: Feature definition with Id 77658379-50ff-4e1e-a431-5652bee07a87 failed validation

Looking for ‘ReceiverAssembly’ attribute in manifest root node for solution

Looking for ‘ReceiverClass’ attribute in manifest root node for solution

The ‘Format’ attribute is invalid – The value ‘CheckBoxes’ is invalid according to its datatype

I debug further to find out where the problem is-

I downloaded the saved wsp’s from  /_catalogs/solutions/Forms/AllItems.aspx to my desktop

Renamed it to .cab

Extracted all the contents and found some interesting facts along with manifest.xml file like-

List Instances

Modules

Property bags

web template

Inside List Instances, I found ElementsFields.xml

Once I opened the above xml file, search for the checkboxes and found the following-

save as template

Further exploration on this, it seems that the checkbox attribute is invalid and needs to be modified.

Resolution:-

After this one, the solution is pretty much simple, just go ahead and remove that affected column / remove the affected content type – does not require IISRESET also.

chart web part sharepoint2013_12

Chart webpart SharePoint 2013

In this post we will discuss how to populate a chart web part from a SharePoint list. Here I am using chart web part in SharePoint 2013. Though Microsoft removed chart web part, you can check this work around to make chart web part available in SharePoint 2013.

Here I have a SharePoint list name as “Course” which has 5 columns and the data are like below:

chart web part sharepoint2013

chart web part sharepoint2013

Here I want to show a chart (bar) and want to see in Sharepoint 2013 how many trained, novice, intermediate and expert people. Similarly for SharePoint 2010, Asp.net and C#.Net skills.

For this first add a chart web part to the page (Edit Page -> INSERT -> Web Part). Once you will put the chart it will appear like below. Save the page.

chart web part sharepoint2013

chart web part sharepoint2013

After that click on Data & Appearance. Then select Connect Chart To Data as shown in the fig below:

Connect chart to webpart sharepoint2013

Connect chart to webpart sharepoint2013

In the next step select “Connect to a List” in the Choose a Data Source section. Then click on Next.

connect list chart webpart sharepoint2013

connect list chart webpart sharepoint2013

In the next step select the site and the list in the drop down.

In the next step it will show you the list and the data. Click Next.

The 4th Step Bind Chart to Data is an important step. Follow below instruction. Here

In the Series expand (click on +) Series Properties. Enter name, here I am putting based on my column names. It should be like below:

Series Name: Trained
Series Type: StackedColumn (From the drop down select the column).
Y Field: Trained (Select Trained Column from drop down)
X Field: Title (Remember this will be same for all series)

So it will appear like below:

series properties chart web part sharepoint2013

series properties chart web part sharepoint2013

Then click on the + icon near series like below:

series properties add chart webpart sharepoint2013_6

series properties add chart webpart sharepoint2013_6

Here also fill the series details like below:

Series Name: Novice
Series Type: StackedColumn (From the drop down select the column).
Y Field: Novice (Select Novice Column from drop down)
X Field: Title (Remember this will be same for all series).

So it will be appear like below:

series properties chart webpart sharepoint2013_7

series properties chart webpart sharepoint2013_7

Add all based on the columns. Here I added 4 for each columns (Trained, Novice, Intermediate and Expert).

Then click on Finish.

Now your chat will appear like below:

chart web part sharepoint2013_8

chart web part sharepoint2013_8

If you want to customize a bit like you want to show the count as well as a image in the top right corner follow below steps.

Here click on Data & Appearance, then click on Customize your chat.

Here select Stacked Column and click Next as shown in the fig below:

chart templates

chart templates

You can set the width and Height of the chart web part. then click on Next.

The next step is very important, if you want to Show Legend then you chose Show Legend.

chart web part sharepoint2013_10

chart web part sharepoint2013_10

You can go to the Axis and Gridlines tab and if you do not want the Major Grid lines then you can deselect “Show Major Grid Lines” for both X and Y axis.

If you want to show the Labels then you can select the Label and click on Finish.

chart web part sharepoint2013_11

chart web part sharepoint2013_11

Finally your chart will appear like below:

chart web part sharepoint2013_12

chart web part sharepoint2013_12