We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm using this json on a library, and can't get it to work, it just shows the normal library view and there is no errors shown.
{ "$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([$pic] == '', @currentWeb + '/_layouts/15/userphoto.aspx?size=M', [$pic])", "title": "=if([$pic] == '', '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": "[$Name]" }, { "elmType": "div", "txtContent": "FileType", "style": { "color": "#767676", "font-size": "12px", "margin-bottom": "2px" } }, { "elmType": "div", "style": { "font-size": "14px", "margin-bottom": "12px" }, "txtContent": { "operator": "+", "operands": [ "$", "", "[$FileType]" ] } }, { "elmType": "div", "txtContent": "Description", "style": { "color": "#767676", "font-size": "12px", "margin-bottom": "2px" } }, { "elmType": "div", "style": { "font-size": "14px", "margin-bottom": "10px", "width": "235px", "height": "70px" }, "txtContent": "[$Description]" } ] } ] } ] } } }
The text was updated successfully, but these errors were encountered:
Duplicate of Issue #201 (comment)
Sorry, something went wrong.
This issue appears to be resolved. I used your JSON and the images are showing up for me. If you still have issues please re-open a new issue.
No branches or pull requests
I'm using this json on a library, and can't get it to work, it just shows the normal library view and there is no errors shown.
{ "$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([$pic] == '', @currentWeb + '/_layouts/15/userphoto.aspx?size=M', [$pic])", "title": "=if([$pic] == '', '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": "[$Name]" }, { "elmType": "div", "txtContent": "FileType", "style": { "color": "#767676", "font-size": "12px", "margin-bottom": "2px" } }, { "elmType": "div", "style": { "font-size": "14px", "margin-bottom": "12px" }, "txtContent": { "operator": "+", "operands": [ "$", "", "[$FileType]" ] } }, { "elmType": "div", "txtContent": "Description", "style": { "color": "#767676", "font-size": "12px", "margin-bottom": "2px" } }, { "elmType": "div", "style": { "font-size": "14px", "margin-bottom": "10px", "width": "235px", "height": "70px" }, "txtContent": "[$Description]" } ] } ] } ] } } }
The text was updated successfully, but these errors were encountered: