When clicking on Tile, I want the sharepointpage to be redirected to a new sharepointpage, which url comes from the Hyperlinkcolumn Lien. How?

22 views Asked by At

I will start with the images: First the view is the colored tiles. what I want is when I click on a Tile, it has to redirect our sharepoint online to page to another page. The Url comes from the column Lien.

This formated View is based on this list. Formated view

SharepointList

This is my JSON CODE:

{ "$schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json", "hideSelection": true, "hideColumnHeader": true, "rowFormatter": { "elmType": "div", "style": { "display": "flex", "float": "left", "flex-wrap": "wrap", "align-items": "stretch", "flex-direction": "row", "padding": "5px", "margin": "10px", "max-width": "500px", "border-radius": "8px", "box-shadow": "5px 5px 5px grey", "background-color": "=if([$Couleur]=='Vert', '#E1F8D6',if([$Couleur]=='Rose','#FFECF7',if([$Couleur]=='Bleu','#EDDFFF','#FFDACA')))" }, "children": [ { "elmType": "div", "style": { "flex-grow": "1", "display": "flex", "flex-direction": "column", "flex-wrap": "nowrap", "align-items": "left", "max-width": "500px", "min-width": "450px", "padding-left": "10px" }, "children": [ { "elmType": "img", "style": { "width": "50px", "height": "50px", "padding-top": "10px", "cursor": "pointer", "display": "=if([$Icone]=='','none','')" }, "attributes": { "src": "=getThumbnailImage([$Icone], 50, 50)" } }, { "elmType": "a", "attributes": { "href": "[$Lien]", "class": "ms-fontColor-themePrimary ms-fontColor-themeDark--hover" }, "style": { "display": "block", "font-size": "18px", "font-weight": "500", "padding-bottom": "10px", "padding-top": "10px", "text-decoration": "none", "cursor": "pointer" }, "txtContent": "=[$Title]" }, { "elmType": "span", "style": { "font-size": "14px", "text-align": "left", "padding-bottom": "10px", "cursor": "pointer" }, "txtContent": "[$Description]" }, { "elmType": "span", "attributes": { "href": "[$Lien]", "class": "ms-fontColor-red ms-fontColor-redDark--hover" }, "style": { "font-size": "14px", "text-align": "right", "font-weight": "800", "padding-right": "10px", "padding-bottom": "30px", "cursor": "pointer" }, "txtContent": "➔" } ] } ] } }

0

There are 0 answers