5

In SharePoint online i created a document library. In the new experience view you have the possibility to show the list with a tiles view.

is it possible to do it as a default view? If i make a view the tiles setting is not saved

5 Answers 5

0

I don't think we have that feature yet to save tile view as default.

You can check the changes made to tile view and try to create similar custom view. That might help.

2
  • If is save a new view then it doesn't save that settings Oct 20, 2016 at 11:53
  • Its not saving the view, we need to see what changes are made in UI when title view is selected. Similar scripting can be done through SharePoint designer. Basically it will be custom view, not OOTB. Oct 21, 2016 at 5:07
0

When creating a view (or editing one) you set the Style property to Document Details. As with every View, you can set this one as the default view.

enter image description here

Proof of concept (video): https://drive.google.com/file/d/0B5K0Tsrp16dlVExzS3YwZl9EXzA/view

2
  • 1
    Sorry this isn't working. It will always show a list standard then tiles Oct 20, 2016 at 11:52
  • I've set the other view as default, and it shows tiles forst when you click on the library from the start page...
    – Benny Skogberg
    Oct 20, 2016 at 12:00
0

Use Format View works great and add this json:

{
"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",
            "height": "200px"
          },
          "children": [
            {
              "elmType": "span",
              "txtContent": "[$FileName]",
              "style": {
                "margin-bottom": "1px"
              },
              "attributes": {
                "class": "ms-fontSize-m ms-fontWeight-regular ms-fontColor-neutralSecondary"
              }
            }
          ]
        }
      ]
    }
  ]
}

}

2
  • "not a valid JSON"... This JSON is not accepted by SharePoint Online.
    – PhilFancy
    Nov 7, 2019 at 6:46
  • for some reason the last bracket came out of the code window, add ending bracket '}' when you copy the code
    – hikmatune
    Oct 19, 2020 at 23:34
0

Hi hikmatune and Julian Kulker,

I had a similar requirement in SharePoint Online Modern document library. using Hikmatune's code with two changes I got something that is OK for what I need and may help others. I added the missing } at the end of the code AND removed the 200px height constraint which caused photos to stretch and look silly.

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

This works for what we require. A better solution would be to have Microsoft allow us to have a URL parameter to set "Tiled view" and or allow "Tiled View" be remembered / held by the default view chosen by the library owner. Hope this helps others with this issue. Dorje

0

This now seems to be possible out of the box with SharePoint Online.

  1. Create and populate a document library or open an existing library.
  2. Change the view to tile view. You should now see an asterisk (*) next to the view name.
  3. Click "Save current view" to update the view to tile view.

Tested in our tenant with a user who had previously worked on the library and another user who had not seen the library, yet. This worked for both use-cases. YMMV

(Sorry for necroposting. This is the post that Bing AI listed as a solution for this problem when I was researching.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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