0

I have too many pages and want to sort them by folder within the site pages section of site contents

0

There does not seems to be an out of the box way to do it. However you can do it programatically. Below is the snippet to do it in CSOM, you can change it into JSOM or Rest API and use it accordingly.

string siteUrl = "http://mycomapny.sharepoint.com/sites/site1";
ClientContext clientContext = new ClientContext(siteUrl);
//Folder Creation
List list = clientContext.Web.Lists.GetByTitle("Site Pages");
var folder = list.RootFolder;
clientContext.Load(folder);
Folder fld1 = folder.Folders.Add("My Folder1");
clientContext.ExecuteQuery();

Hope that helps..!!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.