none
Search results URL customization RRS feed

All replies

  • In SP2013 there is already a display template defined for discussions. It is the item_community_hoverpanel.html. This template displays a hover panel which has a "View Discussion" or "Open" links that take the user directly to the discussion. Is there a need to click on the url to navigate to the discussion? 

    Blog | SharePoint Field Notes Dev Tool | ClassMaster

    Sunday, June 9, 2013 3:08 AM
  • Hi Steve,

    Thanks for your reply...
    But i think u didnt get my point. Actually what i am expecting is, I should be able to get the indexed discussion urls before displaying it in the search results;change/massage the url within the discussion template so that it does not displays the native sharepoint url in the search results..
    Is this possible?

    Monday, June 10, 2013 4:26 AM
  • Yes I understand. What I don't understand is what relation is there between(https://WebApp/SiteColl/Site/Lists/Team%20Discussion/AllItems.aspx) and https://mysite/Team%20Discussion?

    Would these not be two separate discussions?


    Blog | SharePoint Field Notes Dev Tool | ClassMaster

    Monday, June 10, 2013 2:06 PM
  • (https://WebApp/SiteColl/Site/Lists/Team%20Discussion/AllItems.aspx) is my backend and
    https://mysite/Team%20Discussion is my front end application..

    Sharepoint search crawls the backend and shows backend(native sharepoint url) results in the search results. When an user searches for a keyword, it should bring my front end application urls instead of backend url..

    found a reference link : http://social.technet.microsoft.com/Forums/en-US/sharepointsearchprevious/thread/8832755b-2d34-4eed-92f3-a2705588f953.

    Kindly go through the above url and confirm whether u got my point, so that i can ask u another doubt if u dont mind ;)
    Many thanks Steve

    Tuesday, June 11, 2013 4:06 AM
  • Hi ,

    Presuming that you are using BCS indexing connectors ,we can use

    <Property Name="DisplayUriField" Type="System.String">Url</Property>

    where url is property fed as front end application url..so that we see indexed url of the front end application url.

    but if you are using cusom connector 

    InputUriProcessor,OutputUriProcessor to process the url before it is fed to index 

    Refer :http://msdn.microsoft.com/en-us/library/gg294165.aspx for more info.

    But am not sure how we can tweak the url before rendered in client application.

    Regards,

    RK.


    Tuesday, June 11, 2013 5:39 AM
  • In case anyone is interested, if you've got a SharePoint search result page and you want to update the links to point to a custom page instead of the list items's default display view, here is a little script you can add to the search result page.

    Below, my list name is MyCustomList and I want when I click on something to instead of going to the default display view to go to my page MyCustomArticlePage and pass in the ID of the item:

    <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
    <script type="text/javascript">
    $(window).load(function() {
    setTimeout(function() {
        $('a[href*="MyCustomList"]').each(function() {
    var oldUrl = $(this).attr("href"); 
                var newUrl = oldUrl.replace("/Lists/MyCustomList/DispForm.aspx?ID=", "/pages/MyCustomArticlePage.aspx?ItemID="); // Create new url
    
                $(this).attr("href", newUrl); 
    });
    
        }, 
    1000);
    
    $('a[href*="MyCustomList"]').each(function() {
    var oldUrl = $(this).attr("href"); 
                var newUrl = oldUrl.replace("/Lists/MyCustomList/DispForm.aspx?ID=", "/pages/MyCustomArticlePage.aspx?ItemID="); // Create new url
    
                $(this).attr("href", newUrl); 
    });
    
    });
    </script>

    Tuesday, October 8, 2019 3:22 PM