none
Download link along with the Fast Search results link RRS feed

  • Question

  • In fast Search results page after clicking the link i like to have the save as dialog box i.e i dont want the profile page to show the click here to download link.

    Ananth

    Thursday, December 13, 2012 8:46 AM

All replies

  • Hi AnanthRamanathan.

    Can you please be specific what you want to accomplish.

    If you want to download a file from result page, you can redirect to your custom download page(modifying XSLT) by sending document URL and download that file using httpwebrequest.  


    umashankar

    Friday, December 14, 2012 1:40 PM
  • Hi Umashankar,

    After clicking the Fast search results hyperlink i directly wants to download it instead of redirecting to a custom download page. For that what i need to alter in the XSLT?


    Ananth

    Monday, December 17, 2012 5:04 AM
  • Hi AnanthRamanathan.

    Default behavior of FAST result is when we click on result title, if it is some aspx, list or library URL it redirects to that page. If result is office document such as doc, excel etc. it gives a prompt to open, save or cancel. For PDF documents, document directly opens on result page depending on our browser setting.

    Now, in previous post where I have told that redirect or open a new window to a custom download page. Custom download page should actually a blank page in which on page load event we need to implement the logic of download. So whenever a user will click on title on result page, they will get a pop up to save, open or cancel from that custom download page while still remaining on result page. But this should be done only when we need a prompt for download for each and every type of document.

    On change in xslt may work if instead of redirecting to URL of result on same page, we can specify TARGET="_blank" of anchor tag of title, so that selected result will open in a new window.

    Thanks and regards


    umashankar

    Wednesday, December 19, 2012 9:33 AM
  • Hi Uma,

    Thanks for your reply.  Is TARGET="_blank" to be added only in the results section of XSL?

    After changing this do i need to recrawl or can continue searching?

    Regards,

    Ananth.R


    Ananth

    Thursday, December 20, 2012 4:52 AM
  • Hi Ananth,

    Yes, we need to add TARGET="_blank" only in result section of xslt where anchor tag<a>  for title is defined. We can locate this anchor tag<a> easly in xslt by searching <xsl:value-of select="title"/>.

    As xslt is used to display the result xml into required formatting, we need not to recrawl the content, if we make changes in xslt of core result web part.

    Regards.

    
    
    

    umashankar

    Friday, December 21, 2012 6:03 PM
  • Hi Umashankar,

    Added as you have mentioned and didnt crawl but am not getting the dialog box to save as expected.

    The code is

    <div class="srch-Title2">
                <div class="srch-Title3">
                  <a href="{$url}" id="{concat($currentId,'_Title')}" title="{title}" TARGET="_blank">
                    <xsl:choose>
                      <xsl:when test="hithighlightedproperties/HHTitle[. != '']">
                        <xsl:call-template name="HitHighlighting">
                          <xsl:with-param name="hh" select="hithighlightedproperties/HHTitle" />
                        </xsl:call-template>
                      </xsl:when>
                      <xsl:otherwise>
                        <xsl:value-of select="title"/>
                      </xsl:otherwise>
                    </xsl:choose>
                  </a>
                </div>
              </div>

    Anything am missing?

    Regards,

    ANanth.R


    Ananth

    Thursday, December 27, 2012 9:05 AM
  • Hi Ananth,

    After adding TARGET="_blank",  a new window will open instead of opening in the same window when you click on title tag of result page. Eeverything else will depend on your browser setting.

    Also Note, results which have picturethumbnailurl > 0 , its title is forming in following tag

    <xsl:when test="string-length(picturethumbnailurl) &gt; 0 and contentclass[. = 'STS_ListItem_PictureLibrary']">
                  <div style=" padding-top: 2px; padding-bottom: 2px;">
                   <div class="srch-picture1">
                      <img src="/_layouts/images/imageresult_16x16.png" />
                   </div>
                   <div class="srch-picture2">
                      <img class="srch-picture" src="{picturethumbnailurl}" alt="" />
                   </div>
                      <span><ul class="srch-picturetext">
                      <li class="srch-Title2 srch-Title5">
                         <a href="{$url}" id="{concat('CSR_',$id)}" title="{title}">
                         <xsl:choose>
                            <xsl:when test="hithighlightedproperties/HHTitle[. != '']">
                              <xsl:call-template name="HitHighlighting">
                                 <xsl:with-param name="hh" select="hithighlightedproperties/HHTitle" />
                              </xsl:call-template>  
                            </xsl:when>
                            <xsl:otherwise><xsl:value-of select="title"/></xsl:otherwise>
                         </xsl:choose>
                         </a>

    Thanks and Regards.

                     


    umashankar

    Friday, December 28, 2012 7:33 AM
  • Hi Uma,

    Still not getting. Am using IE9. Is that the only place i have to add target="_blank" or any < ahref ...> too...

    Regards,

    Ananth.R.


    Ananth

    Friday, December 28, 2012 10:55 AM