My site has build in page called person.aspx, which is redirected from people search results on clicking person name or image in people results.
But suppose if you want to redirect to another page, let say new-person.aspx, then you need to customize redirection url in people core results.
To redirect user to new-person.aspx follow this steps
But suppose if you want to redirect to another page, let say new-person.aspx, then you need to customize redirection url in people core results.
To redirect user to new-person.aspx follow this steps
- Go to People Search results page.
- Edit People Search core results web part.
- Under Display Properties, uncheck "Use Localization Visualization"
- Click "XML Editor.."
- Copy content to text editor( word or notepad ++)
- Search for text " "
- Modify href property of a tag under div.
- $url variable contains redirect url, which redirects to person.aspx
As sharePoint 2010 supports XSLT 1.0 , you cannot use replace function which is part of XSLT 2.0
But here we can make use of other xslt functions such as concate,substring-before and substring-after
Replace this statement href="{ddwrt:EnsureAllowedProtocol(string($url))}" with
href="{ddwrt:EnsureAllowedProtocol(concat(concat(substring-before($url,'Person.aspx'),'new-person.aspx'),(substring-after($url,'Person.aspx'))))}"
- After modification copy content to XML Editor pane,
- Hit apply and save.
- Refresh page
Now on clicking user picture in people search results, it will redirect to new-person.aspx
Happy Coding !
