1

I am required to create a display template programatically which is via visual studio and I am really new to this. Can anyone share with me a sample source code for creating display templates and how to use them in Sharepoint? Thanks in advance, appreciate it :)

1 Answer 1

1

The following article from official sources should give you a start.

https://docs.microsoft.com/en-us/sharepoint/dev/general-development/sharepoint-design-manager-display-templates

There can be a fair bit involved depending on what you are trying to achieve. More often than not I find most customisation can start from an a copy of an existing template. This can be achieved by opening the Master Page Gallery-> Display Templates and copying an existing template. A template will generally consist of a *.html and *.js of which are both associated.

If you do wish to start from a blank display template I can recommend the following starter template from Elio Struyf.

https://www.eliostruyf.com/starter-javascript-display-templates-for-your-projects/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.