Title Back Colour Keyoti Title Line Title Curve
Blue Box Top

Modify link behaviour in search results container <div id='sew_searchResultControl'>&l - SearchUnit - Forum

Welcome Guest Search | Active Topics | Log In | Register

Options
andewhite
#1 Posted : Friday, May 29, 2020 5:38:59 PM
Rank: Newbie

Groups: Registered

Joined: 5/19/2020
Posts: 3
Location: England
Hello,

Would welcome any ideas / suggestions on how do get any given link, within the <div id='sew_searchResultControl'></<div> container, to open a new tab / new window instead of replacing the current search results page?

Thanks in advance.

Regards,
andewhite
Jim
#2 Posted : Friday, May 29, 2020 6:04:32 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,669
Location: Canada
Hi, please see https://keyoti.com/produ...0Usage/BasicSearch.html and scroll to Templating The Controls

This will probably do what you want
Code:

<div id="sew_searchResultControl">
        <div class="sew_ajax_loader_backer"><div class="sew_ajax_loader"></div></div>
        <div class="sew_ajax_error">
            <span class='sew_errorTitle'>Error</span>
            <p class='sew_errorBody'></p>
            <div class="sew_ajax_error_footer">
                <input type="button" value="OK" id="sew_errorOKButton" />
            </div>
        </div>
        <div id="sew_resultView">
            <div id="sew_resultHeader">
            </div>
<div id="sew_resultItemTEMPLATE" class="sew_resultItem">
                <span class="sew_resultItemLink"><a href="${UriStringWithKeywords}" target="_new">${Title}</a></span>
                <span class="sew_resultItemSummary">${Summary}</span>
                <span class="sew_previewResultWrapper"><img alt="Click to preview the document text" src="/Keyoti_SearchEngine_Web_Common/ResultPreview_Expander_Closed.png"
                    onclick="keyotiSearchResultPreviewer.toggleResultPreview(this,
                    '${UriStringAsStored}',
                    '/Keyoti_SearchEngine_Web_Common/ResultPreview_Expander_Closed.png',
                    '/Keyoti_SearchEngine_Web_Common/ResultPreview_Expander_Opened.png')"/>
                <span class="sew_previewResultContent">Loading document...</span></span>
                <div style="clear:both; height:1px;"></div>
                <span class="sew_resultItemURL">${UriString}</span>
                <span class="sew_keywordHitMap">${KeywordHitMap}</span>   
            </div>                       
                   
            <div id="sew_resultFooter"></div>
        </div>
    </div>



Regards
Jim
-your feedback is helpful to other users, thank you!


andewhite
#3 Posted : Tuesday, June 23, 2020 12:43:35 PM
Rank: Newbie

Groups: Registered

Joined: 5/19/2020
Posts: 3
Location: England
Many thanks for this information.

Would I be right in thinking that if the indexed documents were located within the IIS ~/App_Data folder, then we could further customize the <div id="sew_resultItemTEMPLATE" class="sew_resultItem"> element, as necessary.

This would facilitate access to indexed documents, despite any given document's URL containing the "App_Data" string.

Or, does the SearchUnit product have a mechanism for providing URL access to documents within an IIS web application's ~/App_Data folder?

Thanks in advance for any suggestions or solutions.

Regards,
andewhite
Jim
#4 Posted : Tuesday, June 23, 2020 5:27:04 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,669
Location: Canada
There are 2 ways to modify result URLs, you can use what is described here in section 2 https://keyoti.com/produ...loyment%20Scenarios.htm

Or you can use a plugin to access the results https://keyoti.com/produ...IntroductionPlugins.htm there is an event called "ResultItemsFinalized" which will give you the results that you can modify.

But I'm not entirely sure why you need to do this at all, how will the user access the document when they click the result URL? If you have an accessible URL for the user, why not just have the indexer index those URLs? Could you explain a bit more of your setup?

Best
Jim
-your feedback is helpful to other users, thank you!


Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.




About | Contact | Site Map | Privacy Policy

Copyright © 2002- Keyoti Inc.