First experiences with SharePoint 2013 item templates
Microsoft has done a great job with pushing their search technology a step further into the central arena of creating SharePoint applications:
- Using the content by search webpart one can now show result sets across site collections whereas the content by query webpart was limited to the scope of only one site collection;
- Using display templates in order to create customized visual representations – just by editing html templates right from your favorite html design tool.
Some caveats though that I would like to express, hoping to influence Microsoft product development:
- Web Part configuration – the configuration of all the various content search webparts across your solution can become quite cumbersome, i.e. 1) Browse to the page, 2) Toggle Edit mode, 3) Edit the webpart, 4) Edit all the various settings of the content by search webpart, 5) Save the webpart settings, 6) Save the page. I am looking forward to a tool that will make my live easier;
- Where is the js bundle? These display templates are automatically compiled into JavaScript files which are supplied to the user’s browser. If you have a lot of them on one page, all of these .js-files are essentially supplied separately! It would be great to have a bundler in place, that serves all JavaScript code at once;
- Selecting the right metadata – your display template needs to know what metadata fields are available to render. SharePoint currently does not have a tool on board to help you in catching available metadata. You need to traverse from content type internal fields names into the search schema yourself to discover the metadata field names!
- Separating html from JavaScript – Microsoft promises great separation of jobs between web designer and developer. Using display templates the web designer should be able to create presentations with their favorite html tooling. Unfortunately a display template still contains loads of JavaScript and conditional logic! We are hoping on improvements in the future;
- Server-side rendering – with the new JavaScript based display template model, customized rendering will be taking place solely client-side. Is this good or bad? Don’t get me wrong, I really like the asynchronous processing, but I am not confortable with doing everything client-side.
Reacties