none
aspx Preview in search results via hover RRS feed

  • Question

  • Hello

    Is it possible to preview aspx sites in search results via hover like pdf, ppt,.... in sharepoint 2013 enterprise with installed oos 2016??

    If yes, please be so kind and give me adivce where i can find a manual or link.

    Cheers!

    Thank you

    Holger

    Wednesday, April 10, 2019 4:50 AM

All replies

  • Hi,

    Office files such as Word, PPT can be preview in Search Results via Office Online Server and Office Online Server is compatible with SharePoint 2013:

    Installing Office Online Server

    While preview Pdf file, need to edit item_Default_HoverPanel.html display template:

    SharePoint 2013 PDF Preview in hover panel

    Thanks

    Best Regards


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Wednesday, April 10, 2019 7:19 AM
  • Hi,

    thx for your answer, but it doesn't answer my question?

    My question is, if there is a way to show "aspx-Sites" in preview mode within seasrch results when I hover over them??

    Thx

    PS: And as I mentioned I have already installed OOS 2016!
    • Edited by Preslinde Wednesday, April 10, 2019 10:54 AM
    Wednesday, April 10, 2019 10:45 AM
  • Hi,

    As I tested, SharePoint can preview .aspx page with default page layout in search result like this:

    For custom page layout, preview issue, please check the solution in the thread below:

    Unable to get preview of aspx pages having custom page layout in search in SharePoint Online

    Thanks

    Best Regards


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Thursday, April 11, 2019 8:08 AM
  • Thx for your proposal concerning my problem!

    But it doesn`t solve it.

    Item_Default.html looks like this: 

    <!--#_ 
            if(!$isNull(ctx.CurrentItem) && !$isNull(ctx.ClientControl)){
                var id = ctx.ClientControl.get_nextUniqueId();
                var itemId = id + Srch.U.Ids.item;
    var hoverId = id + Srch.U.Ids.hover;
    var hoverUrl = "~sitecollection/_catalogs/masterpage/Display Templates/Search/Item_WebPage_HoverPanel.js";
                $setResultItem(itemId, ctx.CurrentItem);
    if(ctx.CurrentItem.IsContainer){
    ctx.CurrentItem.csr_Icon = Srch.U.getFolderIconUrl();
    }
    ctx.currentItem_ShowHoverPanelCallback = Srch.U.getShowHoverPanelCallback(itemId, hoverId, hoverUrl);
                ctx.currentItem_HideHoverPanelCallback = Srch.U.getHideHoverPanelCallback();

    Below i have this div, is there also something to change (for example Default Item in Custom Item)?

    <div id="_#= $htmlEncode(itemId) =#_" name="Item" data-displaytemplate="DefaultItem" class="ms-srch-item" onmouseover="_#= ctx.currentItem_ShowHoverPanelCallback =#_" onmouseout="_#= ctx.currentItem_HideHoverPanelCallback =#_">
    _#=ctx.RenderBody(ctx)=#_
                    <div id="_#= $htmlEncode(hoverId) =#_" class="ms-srch-hover-outerContainer"></div>
                </div>

    Item_WebPage_HoverPanel looks like this:

     <div id="Item_WebPage_HoverPanel">

    <!--#_
    var i = 0;
    var id = ctx.CurrentItem.csr_id;
            var loadSiteFrame = false;
            ctx.CurrentItem.csr_ShowFollowLink = true;
            ctx.CurrentItem.csr_ShowViewLibrary = false;
            ctx.CurrentItem.csr_ShowLastModifiedTime = false;
            ctx.CurrentItem.csr_ShowAuthors = false;
    _#-->
    <div class="ms-srch-hover-innerContainer ms-srch-hover-standardSize" id="_#= $htmlEncode(id + HP.ids.inner) =#_">
    <div class="ms-srch-hover-arrowBorder" id="_#= $htmlEncode(id + HP.ids.arrowBorder) =#_"></div>
    <div class="ms-srch-hover-arrow" id="_#= $htmlEncode(id + HP.ids.arrow) =#_"></div>
    <div class="ms-srch-hover-content" id="_#= $htmlEncode(id + HP.ids.content) =#_" data-displaytemplate="WebPageHoverPanel">
                    <div id="_#= $htmlEncode(id + HP.ids.header) =#_" class="ms-srch-hover-header">
    _#= ctx.RenderHeader(ctx) =#_
    </div>
                    <div id="_#= $htmlEncode(id + HP.ids.body) =#_" class="ms-srch-hover-body">
    <!--#_
                        if(!Srch.U.w(ctx.CurrentItem.csr_Path) && Srch.U.isSameHost(ctx.CurrentItem.csr_Path, Srch.U.getHostName())) {
                            ctx.CurrentItem.csr_DataShown = true;
                            loadSiteFrame = true;
                            var idViewerEncoded = $htmlEncode(id + HP.ids.viewer);
                            var idGlassViewerEncoded = "glass_" + idViewerEncoded;
    _#-->
                            <div class="ms-srch-hover-viewerContainer ms-srch-hover-siteViewerContainer">
                                <div id="_#= idGlassViewerEncoded =#_" class="ms-srch-hover-glass-siteViewer"></div>
                                <iframe id="_#=idViewerEncoded=#_" src="_#= $urlHtmlEncode(ctx.CurrentItem.csr_Path) =#_" scrolling="no" frameborder="0px" class="ms-srch-hover-siteViewer">
                                </iframe>                            
                            </div>
    <!--#_
                            if(!Srch.U.w(ctx.CurrentItem.ParentLink))
                            {
                                var siteResultsId = id + "_siteSearchResults";
    _#-->
                                <div id="_#= $htmlEncode(siteResultsId) =#_">
                                </div>
    <!--#_
                                AddPostRenderCallback(ctx, function()
                                {
                                    var query = "";
                                    var dataProvider = ctx.ClientControl.get_dataProvider();
                                    if (dataProvider) {
                                        var states = dataProvider.get_currentQueryState()
                                        if (states) {
                                            query = states.k;
                                        }
                                    }

                                    Srch.SiteSearchUtil.populateSiteSearchResults(ctx.CurrentItem.ParentLink, siteResultsId, query);
                                });
                            }                        
                        }
    _#-->
                        _#= ctx.RenderBody(ctx) =#_
                    </div>
    <div id="_#= $htmlEncode(id + HP.ids.actions) =#_" class="ms-srch-hover-actions">                  
    _#= ctx.RenderFooter(ctx) =#_
    </div>
    </div>
    <!--#_
    if(loadSiteFrame){
    AddPostRenderCallback(ctx, function(){
    HP.loadSiteViewer(ctx.CurrentItem.id, ctx.CurrentItem.id + HP.ids.inner, id + HP.ids.viewer, ctx.CurrentItem.csr_Path, "glass_" + id + HP.ids.viewer);
    });
    }
    _#-->
    </div>
     </div>

    Thx for further Ideas!

    PS: is there maybe a solution with office online server?



                            
    • Edited by Preslinde Wednesday, April 17, 2019 6:40 AM
    Wednesday, April 17, 2019 5:45 AM