Modern Sharepoint Site Design - Doc Library Creation with Links!

%3CLINGO-SUB%20id%3D%22lingo-sub-1113003%22%20slang%3D%22en-US%22%3EModern%20Sharepoint%20Site%20Design%20-%20Doc%20Library%20Creation%20with%20Links!%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1113003%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Folks%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20created%20a%20basic%20Json%20Script%20which%20binds%20a%20Modern%20Site%20to%20a%20HUB.%20It%20also%20adds%20about%20seven%20doc%20libraries%20to%20the%20site.%20My%20issue%20is%20I%20would%20like%20these%20doc%20libraries%20to%20be%20navigable%20from%20the%20left%20hand%20links%20bar.%20But%20I%20can't%20seem%20to%20figure%20out%20how.%20Is%20it%20possible%20to%20do%20this%20from%20Json%20Script%20or%20flow%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOverview%3A%3C%2FP%3E%3CP%3EThe%20boss%20want's%20to%20dictate%20the%20folder%20(library%20%2F%20folder)%20Structure%20for%20each%20function%2C%20so%20I%20thought%20Site%20Design%20would%20be%20the%20way%20forward.%20Employees%20can%20create%20a%20new%20site%20and%20then%20select%20the%20template%20(Site%20design)%20and%20the%20structure%20is%20prepopulated%20for%20them.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EScript%20Summary%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%3E%7B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22%24schema%22%3A%20%22schema.json%22%2C%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22actions%22%3A%20%5B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22verb%22%3A%20%22joinHubSite%22%2C%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22hubSiteId%22%3A%20%22n9d4b233-5c52-4d5b-9374-be78f92bee83%22%3CBR%20%2F%3E%7D%2C%3CBR%20%2F%3E%7B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22verb%22%3A%20%22createSPList%22%2C%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22listName%22%3A%20%22PreDeal%22%2C%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22templateType%22%3A%20101%2C%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22subactions%22%3A%20%5B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22verb%22%3A%20%22setDescription%22%2C%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22description%22%3A%20%22All%20Predeal%20investment%20docs%20located%20here%22%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%5D%3CBR%20%2F%3E%7D%2C...%E2%80%A6%E2%80%A6%E2%80%A6.%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3CP%3E%3CBR%20%2F%3ERonan%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1113003%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EPowerShell%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESites%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1113299%22%20slang%3D%22en-US%22%3ERe%3A%20Modern%20Sharepoint%20Site%20Design%20-%20Doc%20Library%20Creation%20with%20Links!%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1113299%22%20slang%3D%22en-US%22%3EUse%20this%20action%20to%20add%20to%20navigation%3A%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fdeclarative-customization%2Fsite-design-json-schema%23add-a-navigation-link%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fdeclarative-customization%2Fsite-design-json-schema%23add-a-navigation-link%3C%2FA%3E%3CBR%20%2F%3EIf%20you%20want%20to%20add%20folders%2C%20you%20will%20need%20to%20call%20a%20Flow%20in%20the%20site%20script%20and%20in%20Flow%20use%20the%20add%20folder%20action.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1114441%22%20slang%3D%22en-US%22%3ERe%3A%20Modern%20Sharepoint%20Site%20Design%20-%20Doc%20Library%20Creation%20with%20Links!%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1114441%22%20slang%3D%22en-US%22%3EThanks%20Alan!%3CBR%20%2F%3EI%20was%20trying%20the%20following%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%7B%3CBR%20%2F%3E%22verb%22%3A%20%22createSPList%22%2C%3CBR%20%2F%3E%22listName%22%3A%20%22PreDeal%22%2C%3CBR%20%2F%3E%22templateType%22%3A%20101%2C%3CBR%20%2F%3E%22subactions%22%3A%20%5B%3CBR%20%2F%3E%7B%3CBR%20%2F%3E%22verb%22%3A%20%22setDescription%22%2C%3CBR%20%2F%3E%22description%22%3A%20%22All%20predeal%20investment%20docs%20located%20here%22%3CBR%20%2F%3E%7D%3CBR%20%2F%3E%5D%3CBR%20%2F%3E%7D%2C%3CBR%20%2F%3E%7B%3CBR%20%2F%3E%22verb%22%3A%20%22addNavLink%22%2C%3CBR%20%2F%3E%22url%22%3A%20%22%2FLists%2FPreDeal%22%2C%3CBR%20%2F%3E%22displayName%22%3A%20%22PreDeal%22%2C%3CBR%20%2F%3E%22isWebRelative%22%3A%20true%3CBR%20%2F%3E%7D%2C%3CBR%20%2F%3E%3CBR%20%2F%3EHowever%20it%20doesn't%20seem%20to%20be%20working.%20I%20could%20put%20the%20full%20URL%20in%20but%20It%20would%20have%20to%20adapt%20to%20parent%20url%20for%20each%20site.%20Which%20is%20where%20I%20get%20a%20bit%20lost.%20I've%20also%20tried%20%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%7B%3CBR%20%2F%3E%22verb%22%3A%20%22createSPList%22%2C%3CBR%20%2F%3E%22listName%22%3A%20%22PreDeal%22%2C%3CBR%20%2F%3E%22templateType%22%3A%20101%2C%3CBR%20%2F%3E%22subactions%22%3A%20%5B%3CBR%20%2F%3E%7B%3CBR%20%2F%3E%22verb%22%3A%20%22setOnquicklaunch%22%2C%3CBR%20%2F%3E%22Onquicklaunch%22%3A%20%22True%22%3CBR%20%2F%3E%7D%3CBR%20%2F%3E%5D%3CBR%20%2F%3E%7D%2C%3CBR%20%2F%3E%3CBR%20%2F%3EStill%20having%20fun.%20I'll%20work%20it%20out.%20Thanks%20for%20the%20pointers..%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1124686%22%20slang%3D%22en-US%22%3ERe%3A%20Modern%20Sharepoint%20Site%20Design%20-%20Doc%20Library%20Creation%20with%20Links!%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1124686%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F180%22%20target%3D%22_blank%22%3E%40Alan%20Marshall%3C%2FA%3EThanks%20Alan%20that%20is%20an%20awesome%20tool%20I%20wasn't%20aware%20of%20before.%20I'm%20still%20struggling%20to%20get%20any%20of%20the%20above%20scripts%20to%20work%20-adding%20the%20quick%20link's.%20This%20must%20be%20causing%20others%20a%20headache.%20I%20notice%20if%20I%20create%20a%20new%20library%20from%20the%20%22View%20All%20Contents%20Page%22%20it%20offers%20an%20option%20to%20add%20link%20to%20quick%20links%20in%20a%20tickbox%2C%20so%20the%20logic%20must%20be%20sitting%20there%20somewhere%3B%20just%20beyond%20my%20comprehension.%20I'll%20let%20you%20know%20if%20I%20figure%20it%20out.%20Big%20thanks%20for%20the%20support..%20%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1115487%22%20slang%3D%22en-US%22%3ERe%3A%20Modern%20Sharepoint%20Site%20Design%20-%20Doc%20Library%20Creation%20with%20Links!%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1115487%22%20slang%3D%22en-US%22%3EHave%20you%20tried%20using%20site%20designer.io%20we%20site%3F%20That%20will%20create%20the%20correct%20syntax%20for%20you.%3C%2FLINGO-BODY%3E
Occasional Contributor

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

 

 

5 Replies
Use this action to add to navigation: https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-design-json-schema#ad...
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.
Thanks 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..
Have you tried using site designer.io we site? That will create the correct syntax for you.

@Alan MarshallThanks Alan that is an awesome tool I wasn't aware of before. I'm still struggling to get any of the above scripts to work -adding the quick link's. This must be causing others a headache. I notice if I create a new library from the "View All Contents Page" it offers an option to add link to quick links in a tickbox, so the logic must be sitting there somewhere; just beyond my comprehension. I'll let you know if I figure it out. Big thanks for the support..  

@Ronan Dowling Your 3rd site script posted doesn't appear to be right. "SetOnquicklaunch" is not a verb for site designs.

The 2nd site script (first on your second post) appears to be correct. Can you tell us what you mean by it doesn't seem to be working?