From be797b26644f32409a6443dbbd5512996a93a0f6 Mon Sep 17 00:00:00 2001 From: shagel7984 Date: Wed, 13 Feb 2019 17:43:50 +0100 Subject: [PATCH] Added Amp rtc-config options for the AMP view handler, removed rtc-config tag if empty --- RELEASE_NOTES.md | 6 ++++++ .../ad_entity_dfp/src/Plugin/ad_entity/AdView/DFPAmp.php | 2 +- modules/ad_entity_dfp/templates/dfp-amp.html.twig | 4 +++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index cad25be..5ad8d9c 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -4,6 +4,12 @@ Like this module and want to help us making it stable? We appreciate any contribution - have a look at the ROADMAP.md to see the current blockers for the first release candidate. +8.x-1.0-beta32: +- DFP: Added Amp rtc-config options for the AMP view handler, removed rtc-config tag if empty. + +8.x-1.0-beta31: +- DFP: Added Amp rtc-config options for the AMP view handler. + 8.x-1.0-beta30: - DFP: Added personalization options by consent for the AMP view handler. - DFP: Issue #3020997 by Cecilina, mxh: Add an optional setting to define the diff --git a/modules/ad_entity_dfp/src/Plugin/ad_entity/AdView/DFPAmp.php b/modules/ad_entity_dfp/src/Plugin/ad_entity/AdView/DFPAmp.php index 6f90bcf..b2430f3 100644 --- a/modules/ad_entity_dfp/src/Plugin/ad_entity/AdView/DFPAmp.php +++ b/modules/ad_entity_dfp/src/Plugin/ad_entity/AdView/DFPAmp.php @@ -137,7 +137,7 @@ public function entityConfigForm(array $form, FormStateInterface $form_state, Ad $num_vendors = (int) $form_state->getValue($vendor_num); } else { - if (!isset($settings['amp'])) { + if (!isset($settings['amp']['rtc_config'])) { $num_vendors = 1; } else { diff --git a/modules/ad_entity_dfp/templates/dfp-amp.html.twig b/modules/ad_entity_dfp/templates/dfp-amp.html.twig index ba03a61..5122ce9 100644 --- a/modules/ad_entity_dfp/templates/dfp-amp.html.twig +++ b/modules/ad_entity_dfp/templates/dfp-amp.html.twig @@ -1,6 +1,8 @@