Skip to content

Commit

Permalink
Feature: Add priorities
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikdro committed May 6, 2020
1 parent 6092deb commit 4c2b26a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/Controller/JavaScriptController.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function renderJavaScriptAction()
}

$q = new FlowQuery([$this->contextFactory->create()->getCurrentSiteNode()]);
$cookieNodes = $q->find('[instanceof KaufmannDigital.GDPR.CookieConsent:Content.Cookie][javaScriptCode != ""]')->get();
$cookieNodes = $q->find('[instanceof KaufmannDigital.GDPR.CookieConsent:Content.Cookie][javaScriptCode != ""]')->sort('priority', 'DESC')->get();

$javaScript = '';
foreach ($cookieNodes as $cookieNode) {
Expand Down
9 changes: 9 additions & 0 deletions Configuration/NodeTypes.Content.Cookie.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,12 @@
inspector:
group: cookie
editor: Neos.Neos/Inspector/Editors/CodeEditor
priority:
type: string
defaultValue: 0
ui:
label: 'Priorität'
help:
message: 'Die Priorität bestimmt die Ladereihenfolge der unterschiedlichen Cookies. Höhere Zahlen garantieren frühere Ladezeiten.'
inspector:
group: cookie

0 comments on commit 4c2b26a

Please sign in to comment.