You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -1456,6 +1456,37 @@ This will evaluate to a number equal to the height of the browser window (in pix
1456
1456
1457
1457
This will evaluate to a number equal to the width of the browser window (in pixels) when the list was rendered.
1458
1458
1459
+
#### Thumbnails
1460
+
1461
+
In a document library, there is a series of tokens that can be used to retrieve the URL to the thumbnail of a file, including:
1462
+
1463
+
-`@thumbnail.small`, `@thumbnail.medium`, and `@thumbnail.large` evaluate to the thumbnail URL in 3 different predefined sizes.
1464
+
-`@thumbnail.<bounding size>` evaluates to the URL to the largest thumbnails that is not larger than the bounding size in both width and height. For example, `@thumbnail.150` evaluates to the URL to a thumbnail not larger than 150×150 pixels.
1465
+
-`@thumbnail.<bounding width>x<bounding height>` evaluates to the URL to the largest thumbnail that is not larger than the bounding width and bounding height. For example, `@thumbnail.100x200` evaluates to the URL to a thumbnail not wider than 100 pixels and not higher than 200 pixels.
1466
+
1467
+
These tokens will yield no value on non-file items including folders.
1468
+
1469
+
> [!NOTE]
1470
+
> The aspect ratio of thumbnail generated is the same as how the file looks like, changing the bounding sizes will not affect the aspect ratio of the thumbnail.
1471
+
1472
+
> [!TIP]
1473
+
> Thumbnails are only available for a list of supported file formats. It means that sometimes the URL generated is not accessible due to lack of support on certain formats. However, if a valid thumbnail token is set as the _only_`src` attribute of an `img` tag, we will take care of it and hide the image when it is not available.
Copy file name to clipboardExpand all lines: docs/declarative-customization/view-formatting.md
+11-1Lines changed: 11 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -128,9 +128,19 @@ This example uses the `rowFormatter` element, which totally overrides the render
128
128
}
129
129
}
130
130
```
131
-
132
131
You can find this sample with additional details here: [Multi-line view rendering](https://github.com/SharePoint/sp-dev-list-formatting/tree/master/view-samples/multi-line-view)
133
132
133
+
### Alternate Row Formatting based on Modulus
134
+
135
+
This example applies `% (Mod)` to a list view row with alternate coloring the rows:
0 commit comments