Jul 03 2019 10:29 AM
I have created a new sharepoint modern team site, and inside the built-in document library, i want to set the default rendering for all users to be "Titles" instead of "List", as follow:-
I created a new list view and set the rendering as "Tiles" >> set the new list view as the default view >> which will save the setting for the current user only (office 365 admin). but when other users access the new default list view >> the document library will show the items using the "List" rendering , also if the office 365 admin logout/relogin he will also get the "List" rendering instead of "Tiles".. so is there a way to force the default list view for our document library to always render as "Tiles"?
Thanks
Jul 03 2019 11:15 AM
By default the document libraries have only 1 view which is the "All Items" view. From the modern list view you have the option to change the rendering. To always render the document in tile view.
#1. Change the view to Tile View, and select the option to "save this view as"
#2. After saving the view, you will get the option to "set current view as the default"
Jul 03 2019 02:44 PM
@Shijuraj your steps are exactly the same steps which i followed, and which did not work!!.. As if other users access the new defualt view the list view will be rendered using the "List" and not "Tiles",, seems the defualt rendering for the default or custom views will always be "List" and this can not be changed.. maybe MS need to consider this feature..
Jul 03 2019 09:29 PM
@John John just now noticed in list settings, still the default view didn't set. Try to set it and see.
Jul 04 2019 04:56 AM
@Shijuraj wrote:@John John just now noticed in list settings, still the default view didn't set. Try to set it and see.
@Shijurajin my case the new view will be set as the default inside the list settings,,and when users access the library they will be redirected to the new list view, but the list view will be rendered using the "List" and not "Tiles"...
Sep 27 2019 03:42 AM
@john john Did you ever find a solution to this?
Oct 22 2019 01:41 PM
Any update with setting the default view as "tiles"? For a document library, I've set the default view as "tiles" but a few other users access the library and it doesn't automatic default to tile view. The library goes to the list view although the default is set for "tiles" view. Is it a platform issue or a browser issue? Any help how to resolve would be great. Thank you!
Jan 08 2020 02:28 AM - edited Jan 08 2020 02:42 AM
Did anyone come up with a solution for this? Found the below JSON script but when I go back to the default view it displays it in a "List" view with a bar and broken images. Need to have the default view saved in a "Tiles" view,
{
"schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json",
"hideSelection": true,
"hideColumnHeader": true,
"rowFormatter": {
"elmType": "a",
"attributes": {
"class": "ms-borderColor-neutralLight",
"href": "[$FileRef]"
},
"style": {
"float": "left"
},
"children": [
{
"elmType": "div",
"attributes": {
"class": "ms-bgColor-themeLighterAlt ms-bgColor-themePrimary--hover ms-fontColor-white--hover"
},
"style": {
"display": "flex",
"flex-wrap": "wrap",
"flex-direction": "column",
"align-items": "stretch",
"padding": "1px",
"margin": "10px",
"max-width": "930px",
"box-shadow": "2px 2px 4px darkgrey"
},
"children": [
{
"elmType": "img",
"attributes": {
"src": "[$FileRef]"
},
"style": {
"width": "200px"
},
"children": [
{
"elmType": "span",
"txtContent": "[$FileName]",
"style": {
"margin-bottom": "1px"
},
"attributes": {
"class": "ms-fontSize-m ms-fontWeight-regular ms-fontColor-neutralSecondary"
}
}
]
}
]
}
]
}
}
Mar 26 2020 10:14 AM
Same problem here, from what I've read this behavior is a known issue and it will be addressed on "Summer 2020". But if somebody found a trick to make it work, please share.
Sep 01 2020 10:52 PM
Sep 15 2020 11:10 AM
@john john Please find below my step by step approach to setting the "Tiles" as a default view.
Sep 16 2020 05:47 AM
@RaulPop "My JSON? All JSON files I discovered paint ugly rows of color, but not text at all is shown. Please help us all out here. Thank you.
Sep 16 2020 12:44 PM - edited Sep 16 2020 12:46 PM
I’ve adapted the example from https://github.com/pnp/sp-dev-list-formatting/tree/master/view-samples/tile-layout-example-with-imag...
Feel free to explore all the various samples there.
Site Contents - create a new list (with "Show in site navigation")
Column Name | Type |
Title |
|
ItemPrice | Number |
ItemFeatures | Multiple lines |
ItemPicture | Picture |
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json",
"tileProps": {
"height": "450",
"width": "300",
"formatter": {
"elmType": "div",
"style": {
"display": "flex",
"align-items": "stretch",
"margin-bottom": "16px",
"min-width": "150px",
"flex-grow": "1",
"justify-content": "space-around",
"padding": "8px",
"color": "#333333"
},
"children": [
{
"elmType": "div",
"style": {
"width": "95%",
"height": "98%",
"box-shadow": "0px 1.6px 3.6px 0 #00000024, 0px 0.3px 0.9px 0 #00000024",
"overflow": "hidden",
"border-radius": "2px"
},
"attributes": {
"class": "ms-bgColor-neutralLighterAlt"
},
"children": [
{
"elmType": "div",
"style": {
"display": "inline-block",
"min-width": "300px"
},
"children": [
{
"elmType": "img",
"attributes": {
"src": "=if([$ItemPicture] == '', @currentWeb + '/_layouts/15/userphoto.aspx?size=M', [$ItemPicture])",
"title": "=if([$ItemPicture] == '', 'No picture available', [$Picture.desc])"
},
"style": {
"width": "100%",
"height": "200px"
}
}
]
},
{
"elmType": "div",
"style": {
"display": "inline-block",
"min-width": "300px",
"vertical-align": "top",
"padding-left": "16px",
"padding-top": "16px"
},
"children": [
{
"elmType": "div",
"style": {
"color": "#767676",
"font-size": "12px"
},
"txtContent": "Product"
},
{
"elmType": "div",
"style": {
"margin-bottom": "12px",
"font-size": "16px",
"font-weight": "600"
},
"txtContent": "[$Title]"
},
{
"elmType": "div",
"txtContent": "Price",
"style": {
"color": "#767676",
"font-size": "12px",
"margin-bottom": "2px"
}
},
{
"elmType": "div",
"style": {
"font-size": "14px",
"margin-bottom": "12px"
},
"txtContent": {
"operator": "+",
"operands": [
"$",
"",
"[$ItemPrice]"
]
}
},
{
"elmType": "div",
"txtContent": "Features",
"style": {
"color": "#767676",
"font-size": "12px",
"margin-bottom": "2px"
}
},
{
"elmType": "div",
"style": {
"font-size": "14px",
"margin-bottom": "10px",
"width": "235px",
"height": "70px"
},
"txtContent": "[$ItemFeatures]"
}
]
}
]
}
]
}
}
}
Sep 16 2020 12:53 PM
I’ve adapted the example from https://github.com/pnp/sp-dev-list-formatting/tree/master/view-samples/tile-layout-example-with-imag...
Site Contents - create a new list (with "Show in site navigation")
Column Name | Type |
Title |
|
ItemPrice | Number |
ItemFeatures | Multiple lines |
ItemPhoto | Picture |
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json",
"tileProps": {
"height": "450",
"width": "300",
"formatter": {
"elmType": "div",
"style": {
"display": "flex",
"align-items": "stretch",
"margin-bottom": "16px",
"min-width": "150px",
"flex-grow": "1",
"justify-content": "space-around",
"padding": "8px",
"color": "#333333"
},
"children": [
{
"elmType": "div",
"style": {
"width": "95%",
"height": "98%",
"box-shadow": "0px 1.6px 3.6px 0 #00000024, 0px 0.3px 0.9px 0 #00000024",
"overflow": "hidden",
"border-radius": "2px"
},
"attributes": {
"class": "ms-bgColor-neutralLighterAlt"
},
"children": [
{
"elmType": "div",
"style": {
"display": "inline-block",
"min-width": "300px"
},
"children": [
{
"elmType": "img",
"attributes": {
"src": "=if([$ItemPicture] == '', @currentWeb + '/_layouts/15/userphoto.aspx?size=M', [$ItemPicture])",
"title": "=if([$ItemPicture] == '', 'No picture available', [$Picture.desc])"
},
"style": {
"width": "100%",
"height": "200px"
}
}
]
},
{
"elmType": "div",
"style": {
"display": "inline-block",
"min-width": "300px",
"vertical-align": "top",
"padding-left": "16px",
"padding-top": "16px"
},
"children": [
{
"elmType": "div",
"style": {
"color": "#767676",
"font-size": "12px"
},
"txtContent": "Product"
},
{
"elmType": "div",
"style": {
"margin-bottom": "12px",
"font-size": "16px",
"font-weight": "600"
},
"txtContent": "[$Title]"
},
{
"elmType": "div",
"txtContent": "Price",
"style": {
"color": "#767676",
"font-size": "12px",
"margin-bottom": "2px"
}
},
{
"elmType": "div",
"style": {
"font-size": "14px",
"margin-bottom": "12px"
},
"txtContent": {
"operator": "+",
"operands": [
"$",
"",
"[$ItemPrice]"
]
}
},
{
"elmType": "div",
"txtContent": "Features",
"style": {
"color": "#767676",
"font-size": "12px",
"margin-bottom": "2px"
}
},
{
"elmType": "div",
"style": {
"font-size": "14px",
"margin-bottom": "10px",
"width": "235px",
"height": "70px"
},
"txtContent": "[$ItemFeatures]"
}
]
}
]
}
]
}
}
}
Mar 23 2022 05:24 AM
Thanks for this guide @RaulPop - I've followed it and it works :)
It however only works in Sharepoint online - but doesn't affect the Files view in Teams (which is what I was hoping for as we only work with files through Teams).
Any suggestions to how it can affect the view in Teams also?
My "new view name" is called "Default Galleri" (= tiles), and as you can see on the screenshot below, the new view-setting is applied in the drop-down by default in Teams, however the actual view doesn't update accordingly.
Thanks a lot for you help.