Using Sites EditorJust open the Sites editor, Insert>Folder and select the checkbox next to the folder you want to appear. Modify the gadget properties box to meet your requirements, click Save and then Save your page and you're done. E.g. Shared FolderShared Folder Simple! Using ScriptsHow to do this is described herewith enhancements here See also this great blog post by Steve Dito function showFolderInSite() { |
Addition:
If doing the pageList on above mentioned URL
the line:
var title = ""+ files[i].getName() +"";
Must be replaced with:
var title = "<a href=\""+files[i].getUrl()+"\">"+ files[i].getName() +"</a>";
It's in the source-code but the presenting makes the code to a link
If doing the pageList on above mentioned URL
the line:
var title = ""+ files[i].getName() +"";
Must be replaced with:
var title = "<a href=\""+files[i].getUrl()+"\">"+ files[i].getName() +"</a>";
It's in the source-code but the presenting makes the code to a link
and
If you want to add sub-folders I just added:
....getFiles();
var folders = DocsList.getFolderById("SAME_FOLDER_ID").getFolders();
var page = SitesApp.getP....
... AND....
...page.addListItem([title, type, size, owner, lastUpdated]);
}
/*** FOLDERS ***/
for(j in folders){
/*** Title field ***/
var title2 = "<a href=\""+folders[j].getUrl()+"\">"+ folders[j].getName() +"</a>";
// Add data according to the order of columns in your list
page.addListItem([title2, "Folder", "", "", ""]);
}
done = true;
}
catch(e){...
This can be done prettier but it does the job :)
....getFiles();
var folders = DocsList.getFolderById("SAME_FOLDER_ID").getFolders();
var page = SitesApp.getP....
... AND....
...page.addListItem([title, type, size, owner, lastUpdated]);
}
/*** FOLDERS ***/
for(j in folders){
/*** Title field ***/
var title2 = "<a href=\""+folders[j].getUrl()+"\">"+ folders[j].getName() +"</a>";
// Add data according to the order of columns in your list
page.addListItem([title2, "Folder", "", "", ""]);
}
done = true;
}
catch(e){...
This can be done prettier but it does the job :)