Loading a document or another page within a SharePoint page

Ashish Ghatak 1 Reputation point


I have a requirement where I have two panels on a SharePoint page: Left and Right
I need to display a list of documents and pages on the left panel.
On selection, the document should load on the right panel.

How can I achieve this?


A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
6,024 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.
1,675 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Xuyan Ding - MSFT 6,016 Reputation points Microsoft Employee

    Hi @Ashish Ghatak ,

    First add the Web Part of the Document Library to the left panel to display the required document library and Site Pages, and then add the Web Part of the File viewer to the right panel for optional display.

    1. left panel: Add 'Document library' Web Part->Select document library to add to this page.
      2.right panel: Add 'File viewer' Web Part->Cancel->Edit web part->More options->Connect to source->Submit for approval
      213332-image.png 213297-image.png

    3.Below is what we get after the configuration. Please let me know if you have any additional requirements or concerns about the set up I mentioned above.
    Please note: site pages library is not supported

    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.

  2. Ashish Ghatak 1 Reputation point


    How can I achieve this using SPFx? I need to fetch the document location dynamically from a list because the documents could be in multiple libraries. I'm using the list to store the location of the documents irrespective of their location. Please refer to the screenshot. I understand it can't be achieved out of the box and hence was checking if there is a way to achieve this using SPFx.