Forum Discussion

MeganSP's avatar
MeganSP
Copper Contributor
Oct 02, 2023

Add a link to a list in a document library via Site Script / Site Design

How do I add a link to a list in a document library via a site script to be a part of a Template / Site Design? In a document library you can select New -> Link and create a link to show up in the document library. Can I programmatically do this within a site script?

3 Replies

    • ganeshsanap's avatar
      ganeshsanap
      MVP

      NicolasKheirallah,

       

      As per my understanding, OP is asking to add new link (page) inside the document library like: 

      However, the code snippet you suggested will add the link in SharePoint site navigation.

       

      MeganSP, I don't think there is any direct verb/action available for your requirements. Maybe you can do it using the <DataRows> element available in PnP Provisioning schema. However I have not tried it yet so cannot confirm this.

       

      You can check this Microsoft official documentation and see if there is any relevant actions available for your requirements: SharePoint Site template JSON schema 


      Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

Resources