Skip to content
New issue

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

Added Amp rtc-config options for the AMP view handler, removed rtc-co… #30

Open
wants to merge 2 commits into
base: 8.x-1.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 3 additions & 1 deletion modules/ad_entity_dfp/templates/dfp-amp.html.twig
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<amp-ad{{ attributes }}
json='{{ json|json_encode(constant('JSON_HEX_TAG') b-or constant('JSON_HEX_APOS') b-or constant('JSON_HEX_QUOT') b-or constant('JSON_UNESCAPED_UNICODE'))|raw }}'
rtc-config='{{ rtc_config|json_encode(constant('JSON_HEX_TAG') b-or constant('JSON_HEX_APOS') b-or constant('JSON_HEX_QUOT') b-or constant('JSON_UNESCAPED_UNICODE'))|raw }}'
{% if rtc_config %}
rtc-config='{{ rtc_config|json_encode(constant('JSON_HEX_TAG') b-or constant('JSON_HEX_APOS') b-or constant('JSON_HEX_QUOT') b-or constant('JSON_UNESCAPED_UNICODE'))|raw }}'
{% endif %}
>
<div placeholder></div>
<div fallback></div>
Expand Down