From a74b51a965c695728144a0813789f17ebc8532b3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=BCrgen=20Haas?=
 <21467-jurgenhaas@users.noreply.drupalcode.org>
Date: Fri, 15 Nov 2024 11:46:36 +0000
Subject: [PATCH] Issue #3487164 by jurgenhaas, kgertz: Configure consent
 management to be non-intrusive

---
 .../drupal_cms_privacy_basic/composer.json    |  3 +-
 .../menu_link_content/my-privacy-settings.yml | 38 +++++++++++++++++++
 recipes/drupal_cms_privacy_basic/recipe.yml   |  8 ++++
 3 files changed, 48 insertions(+), 1 deletion(-)
 create mode 100644 recipes/drupal_cms_privacy_basic/content/menu_link_content/my-privacy-settings.yml

diff --git a/recipes/drupal_cms_privacy_basic/composer.json b/recipes/drupal_cms_privacy_basic/composer.json
index d9b2b192e..7870074eb 100644
--- a/recipes/drupal_cms_privacy_basic/composer.json
+++ b/recipes/drupal_cms_privacy_basic/composer.json
@@ -5,6 +5,7 @@
     "version": "dev-main",
     "require": {
         "drupal/core": ">=10.3",
-        "drupal/klaro": "3.x-dev"
+        "drupal/klaro": "3.x-dev",
+        "drupal/menu_link_attributes": "^1.5"
     }
 }
diff --git a/recipes/drupal_cms_privacy_basic/content/menu_link_content/my-privacy-settings.yml b/recipes/drupal_cms_privacy_basic/content/menu_link_content/my-privacy-settings.yml
new file mode 100644
index 000000000..da9c16430
--- /dev/null
+++ b/recipes/drupal_cms_privacy_basic/content/menu_link_content/my-privacy-settings.yml
@@ -0,0 +1,38 @@
+_meta:
+  version: '1.0'
+  entity_type: menu_link_content
+  uuid: d7f4f1b2-af94-46b8-ac63-a8a5b14fb0f5
+  bundle: menu_link_content
+  default_langcode: en
+default:
+  enabled:
+    -
+      value: true
+  title:
+    -
+      value: 'My privacy settings'
+  menu_name:
+    -
+      value: footer
+  link:
+    -
+      uri: 'internal:#'
+      title: ''
+      options:
+        attributes:
+          rel: open-consent-manager
+  external:
+    -
+      value: false
+  rediscover:
+    -
+      value: true
+  weight:
+    -
+      value: 0
+  expanded:
+    -
+      value: false
+  revision_translation_affected:
+    -
+      value: true
diff --git a/recipes/drupal_cms_privacy_basic/recipe.yml b/recipes/drupal_cms_privacy_basic/recipe.yml
index 67285751e..4c5cd7d80 100644
--- a/recipes/drupal_cms_privacy_basic/recipe.yml
+++ b/recipes/drupal_cms_privacy_basic/recipe.yml
@@ -6,6 +6,7 @@ recipes:
   - core/recipes/page_content_type
 install:
   - klaro
+  - menu_link_attributes
   - menu_link_content
 config:
   strict: false
@@ -17,12 +18,19 @@ config:
     klaro.settings:
       simpleConfigUpdate:
         auto_decorate_final_html: true
+        library.group_by_purpose: true
+        library.cookie_expires_after_days: 30
     klaro.texts:
       simpleConfigUpdate:
         consentModal.privacyPolicy.url: 'internal:/privacy-policy'
     klaro.klaro_app.cms:
       simpleConfigUpdate:
         label: 'Drupal CMS'
+    menu_link_attributes.config:
+      simpleConfigUpdate:
+        attributes.rel:
+          label: Relationship
+          description: 'The "rel" attribute specifies the relationship between the current document and the linked document.'
     user.role.anonymous:
       grantPermission: 'use klaro'
     user.role.authenticated:
-- 
GitLab