Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi all,
I'm using in our website cookiebot en a gridlayout (with the editor Embed).
I want to edit the iframe by adding 'data-cookieconsent' (https://support.cookiebot.com/hc/en-us/articles/360003790854-Iframe-cookie-consent-with-YouTube-example)
Does anyone know how to fix this?
Best regards,
Ruben
Hi Ruben
The easiest way would be to simply search/replace it in.
If you look at the default Embed view (Views/Partials/Grid/Embed.cshtml), it looks like this:
@model dynamic @using Umbraco.Web.Templates @{ string embedValue = Convert.ToString(Model.value); embedValue = embedValue.DetectIsJson() ? Model.value.preview : Model.value; } <div class="video-wrapper"> @Html.Raw(embedValue) </div>
You can change it so it looks like this:
@model dynamic @using Umbraco.Web.Templates @{ string embedValue = Convert.ToString(Model.value); embedValue = embedValue.DetectIsJson() ? Model.value.preview : Model.value; // add this embedValue = embedValue.Replace(" src=", "data-cookieconsent=\"marketing\" data-src="); } <div class="video-wrapper"> @Html.Raw(embedValue) </div>
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" button below.
Continue discussion
Gridlayout Embed with cookiebot
Hi all,
I'm using in our website cookiebot en a gridlayout (with the editor Embed).
I want to edit the iframe by adding 'data-cookieconsent' (https://support.cookiebot.com/hc/en-us/articles/360003790854-Iframe-cookie-consent-with-YouTube-example)
Does anyone know how to fix this?
Best regards,
Ruben
Hi Ruben
The easiest way would be to simply search/replace it in.
If you look at the default Embed view (Views/Partials/Grid/Embed.cshtml), it looks like this:
You can change it so it looks like this:
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" button below.
Continue discussion