Yesterday we had the first Biwug Quiz. One of the questions was the following:
Display Templates require one of the following options:
The HTML file only makes the creation process of display template easier.
The HTML versions become available once you have activated the SharePoint Server Publishing Infrastructure feature.
If you aren’t working with the HTML file (what I don’t recommend) you will have to do some manual actions.
First of all, start by making a copy of one of the existing display templates. I choose to create a copy of the Item_TwoLines.js file.
The next step is to modify the properties for that file like this:
Once you have modified these properties, it is time to change the template a bit.
To start you will need to update your template URLs in the display template because the reference will be set to the old file.
Then it is up to you what you want to modify in the template, I added a text element that shows “My file extension is: FileExtension”.
This is the end result: