Closed damsfx closed 11 months ago
@tobias-kuendig before considering this PR, could you tell me why you use both push and pull partial refresh in the onAccept()
handler !?
https://github.com/OFFLINE-GmbH/oc-gdpr-plugin/blob/develop/components/CookieBanner.php#L95-L98
https://github.com/OFFLINE-GmbH/oc-gdpr-plugin/blob/develop/components/cookiebanner/optin.htm#L8
IIRC, the content
key was added to provide the rendered content on a constant key to any JS client that wants to do something with the response.
In theory, this is not needed as the user can override the optin partial and add their own partial updates.
IIRC, the
content
key was added to provide the rendered content on a constant key to any JS client that wants to do something with the response.In theory, this is not needed as the user can override the optin partial and add their own partial updates.
So if you want to keep the backward compatibility, you should not accept this PR.
It is not possible to push the content variable for two different partial refreshes??
The best in this case is to update the optin
partial to refresh different sections of the site.
This PR introduce the possibility to refresh multiples partials on user decision.
This may be useful if it is needed to load several parts at different position in the site content.
One use case is Google Tag Manager who needs to load snippets in the HEAD section and in the BODY section (see https://support.google.com/tagmanager/answer/6103696 2.4).
This PR does not introduce breaking changes with actual behavior, it is backward compatible.
Usage example :
The
CookieBanner
component will accept multipleupdate_partial
andupdate_selector
properties by separating them with a comma.