Unable to set the default rendering as "Tiles" for my document library view

Valued Contributor

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:-

 

tiles.png

 

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

 

14 Replies

@john john

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"

Screenshot 2019-07-03 at 11.41.57 PM.png

@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..

@John John just now noticed in list settings, still the default view didn't set. Try to set it and see.

 

Screenshot 2019-07-04 at 9.57.38 AM.png

 


@Shijuraj wrote:

@John John just now noticed in list settings, still the default view didn't set. Try to set it and see.

 

Screenshot 2019-07-04 at 9.57.38 AM.png


@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"...

@john john Did you ever find a solution to this?

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!

@Aristea

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"
}
}
]
}
]
}
]
}
}

 

@john john 

 

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.

It's after the summer, has anyone heard anything? We're still waiting for this...

@john john Please find below my step by step approach to setting the "Tiles" as a default view.

  1. Site Contents - create a new list      (with "Show in site navigation")
  2. Add an new item to the list (at this step the list is made only of the "Title" column).
  3. In the "All Items" drop-down - select "Save view as" - give it a new name. Ensure that "Make this a public view" is ticked.
  4. In the "All Items" drop-down ensure the view with the new name is selected and click "Format current view"
  5. Click 'Advance mode", paste your JSON and click "Save". At this point the view should change to reflect your JSON design. Close the "Format view" section ("x" - right corner).
  6. In the "All Items" drop-down - select "Tiles" (the expected view should be displayed) 
  7. In the "All Items" drop-down - select "Save view as" (keep the same name), just click "Save"
  8. In the "All Items" drop-down - click "Set the current view as default"
  9. The solution -> Click "Save View as" (again with the same name)
  10. Done - the "Tiles" view is set as default

@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.

 

@Jochen Burkhard 

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

 

  1. Add an new item to the list, filling each column accordingly
  2. In the "All Items" drop-down - select "Save view as" - give it a new name. Ensure that "Make this a public view" is ticked.
  3. In the "All Items" drop-down ensure the view with the new name is selected and click "Format current view"
  4. Click 'Advance mode", paste the following JSON and click "Save". Close the "Format view" section ("x" - right corner).
  5. In the "new view name" drop-down - select "Tiles" (the new view should be displayed). At this point the view should change to reflect the new JSON design.
  6. In the ""new view name" " drop-down - select "Save view as" (keep the same name), just click "Save"
  7. In the " new view name " drop-down - click "Set the current view as default"
  8. The solution -> Click "Save View as" (again with the same name)
  9. Done - the "Tiles" view is set as default

 

 

{
  "$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]"
                }
              ]
            }
          ]
        }
      ]
    }
  }
}

 

 

 

@Jochen Burkhard 

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

 

  1. Add an new item to the list, filling each column accordingly
  2. In the "All Items" drop-down - select "Save view as" - give it a new name. Ensure that "Make this a public view" is ticked.
  3. In the "All Items" drop-down ensure the view with the new name is selected and click "Format current view"
  4. Click 'Advance mode", paste the following JSON and click "Save". Close the "Format view" section ("x" - right corner).
  5. In the "new view name" drop-down - select "Tiles" (the new view should be displayed). At this point the view should change to reflect the new JSON design.
  6. In the ""new view name" " drop-down - select "Save view as" (keep the same name), just click "Save"
  7. In the " new view name " drop-down - click "Set the current view as default"
  8. The solution -> Click "Save View as" (again with the same name)
  9. Done - the "Tiles" view is set as default
{
  "$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]"
                }
              ]
            }
          ]
        }
      ]
    }
  }
}

 

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. 

NannaGoto_2-1648038243035.png

 

Thanks a lot for you help.