Forum Discussion
Modern Sharepoint Site Design - Doc Library Creation with Links!
Hi Folks,
I've created a basic Json Script which binds a Modern Site to a HUB. It also adds about seven doc libraries to the site. My issue is I would like these doc libraries to be navigable from the left hand links bar. But I can't seem to figure out how. Is it possible to do this from Json Script or flow?
Overview:
The boss want's to dictate the folder (library / folder) Structure for each function, so I thought Site Design would be the way forward. Employees can create a new site and then select the template (Site design) and the structure is prepopulated for them.
Script Summary:
{
"$schema": "schema.json",
"actions": [
{
"verb": "joinHubSite",
"hubSiteId": "n9d4b233-5c52-4d5b-9374-be78f92bee83"
},
{
"verb": "createSPList",
"listName": "PreDeal",
"templateType": 101,
"subactions": [
{
"verb": "setDescription",
"description": "All Predeal investment docs located here"
}
]
},...……….
Thanks
Ronan
7 Replies
- Alan MarshallIron ContributorUse this action to add to navigation: https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-design-json-schema#add-a-navigation-link
If you want to add folders, you will need to call a Flow in the site script and in Flow use the add folder action.- Ronan DowlingCopper ContributorThanks Alan!
I was trying the following:
{
"verb": "createSPList",
"listName": "PreDeal",
"templateType": 101,
"subactions": [
{
"verb": "setDescription",
"description": "All predeal investment docs located here"
}
]
},
{
"verb": "addNavLink",
"url": "/Lists/PreDeal",
"displayName": "PreDeal",
"isWebRelative": true
},
However it doesn't seem to be working. I could put the full URL in but It would have to adapt to parent url for each site. Which is where I get a bit lost. I've also tried :
{
"verb": "createSPList",
"listName": "PreDeal",
"templateType": 101,
"subactions": [
{
"verb": "setOnquicklaunch",
"Onquicklaunch": "True"
}
]
},
Still having fun. I'll work it out. Thanks for the pointers..- Alan MarshallIron ContributorHave you tried using site designer.io we site? That will create the correct syntax for you.