Posts

Showing posts from June, 2014

Display Template Deployment in SharePoint 2013

Hi Guys, New way to transform search result introduces in SharePoint 2013 which provide a good user experience through the use of display templates. It is far better then using XSLT in SharePoint 2010 to use to customize that display. It is really frustrating while understanding XSLT display templates. The great thing about display templates is that you create them by leveraging skills that many developers already possess: HTML and JavaScript. The most likely approach to creating display templates is to start with an existing display template HTML file and customize it. It’s not too difficult when you get the hang of the _#= (underscore pound equals) syntax. It’s very important to understand what happens when you edit that HTML file. When you click save SharePoint creates a JavaScript file and associates the two together. (The same thing happens when creating master pages using the design manager but HTML to MASTER file). When you select your display template in the content by search w

Custom Site action using MenuItemTemplate

Hi, Site action links are by default added by sharepoint but there could be some cases when you feel like adding new site action to navigate to your custom page or OOB page. In this blog, I will explain how you can and what are the various way to do that. Solution 1 (Using Custom Action): You must heard this term if ever got chance to customize the ribbon or any contextual menu. You can very easily add this element to your custom farm solution just by adding a empty module and then add following code in to it. <?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <CustomAction Id="CustomScript" ScriptBlock="function OpenDialog() { window.scrollTo(0, 0); var context = SP.ClientContext.get_current(); var siteUrl = context.get_url(); if (siteUrl == '/') siteUrl = ''; var options = SP.UI.$create_DialogOptions(); options.url = siteUrl + '/_layouts/<url of your cust