Javascript code to get specific slide

mahesh p 0 Reputation points
2024-07-03T08:53:28.7266667+00:00

I had downloaded "PnP Modern Search Solution" from https://github.com/microsoft-search/pnp-modern-search . Mentioned source solution that helps you to build engaging search based solutions in the SharePoint modern experience. Using above solution I had added PnP search box, PnP Search Filters, PnP Search Results, PnP Search Vertical webparts. I want to display current office page URL instead of path which it's showing document URL. I want to replace Path(default document URL) with URL(suppose if searched content is on nth page of office document) of current page of document when we search the content on pnp search results webpart. Can any one please guide me to fufill the requirement. I have attached screenshot for your reference

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,783 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
3,025 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Ling Zhou_MSFT 18,020 Reputation points Microsoft Vendor
    2024-07-04T05:43:15.1633333+00:00

    Hi @mahesh p,

    According to my knowledge, PnP search is limited to searching documents or List items, not the content of documents, so there is no way to return the URL of a page of a document for the time being.

    We are always looking for ways to improve SharePoint, and your feedback and suggestions are very valuable. We suggest that you can make suggestions on this SharePoint Feedback portal for searching document content in PnP search. Your contribution will be highly appreciated.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.