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

Banner not showing #11

Open
harispepic opened this issue May 17, 2019 · 2 comments
Open

Banner not showing #11

harispepic opened this issue May 17, 2019 · 2 comments
Assignees
Milestone

Comments

@harispepic
Copy link

harispepic commented May 17, 2019

I tried to display the banner but unfortunately without success.

Code

<?php
return [
    '*' => [
        'enabled'             => true,
        'enableLogging'       => true,
        'ignoreBots'          => true,
        'ignoreSegments'      => [ ],
        'cookieName'          => 'countryRedirect',
        'overrideLocaleParam' => 'selected-locale',
        'redirectedParam'     => 'redirected',
        'countryMap'          => [],
        'banners'             => [
          'EN' => 'It looks like your visiting from {countryName}. Do you <a href="{url}">want to visited the international site?</a>',
          'en' => 'It looks like your visiting from {countryName}. Do you <a href="{url}">want to visited the international site?</a>',
          'US' => 'It looks like your visiting from {countryName}. Do you <a href="{url}">want to visited the international site?</a>',
          'us' => 'It looks like your visiting from {countryName}. Do you <a href="{url}">want to visited the international site?</a>',
          'default' => 'It looks like your visiting from {countryName}. Do you <a href="{url}">want to visited the international site?</a>',
        ],
        'overrideIp'          => '72.229.28.185',
    ],
];

Expected behavior
The banner should be displayed

Additional context

  • Craft version: 3.1.27
@billymedia
Copy link

Im also struggling to get banners to work. What is the key? is that the site handle? language?

@sjelfull
Copy link
Member

sjelfull commented Nov 5, 2019

Yeah, sorry, this is quite confusing without proper docs. Even I forget sometimes.

I will rework the syntax for the next big release and add better docs.

The key is the country code of where they are coming from.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants