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

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.

  • If is save a new view then it doesn't save that settings – Julien Kulker Oct 20 '16 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. – Monica Jagani Oct 21 '16 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

  • 1
    Sorry this isn't working. It will always show a list standard then tiles – Julien Kulker Oct 20 '16 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 '16 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"
              }
            }
          ]
        }
      ]
    }
  ]
}

}

  • "not a valid JSON"... This JSON is not accepted by SharePoint Online. – PhilFancy Nov 7 at 6:46
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

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.