6

I have recently installed the Cookie Consent Module on a recent EE site build, and have added an allow cookies link (ie. {cookies_allowed_link} ) to a policy banner at the top of the site.

My question is:

Is there anyway to remove the default EE ' Cookies Allowed ' grey message box from showing? ie. I just want the user to able to click allow cookies and the site just carries on as normal with out going to a message screen.

Many thanks in advance on this :-)

Regards

Karl

  • 1
    Please post a snippet of the rendered HTML where this message is being displayed or a URL where this can be seen live. Will help us provide better answers. – Anna_MediaGirl Dec 15 '12 at 2:38
  • Did any of the answers help you? If yes, please mark the answer correct by clicking on the checkmark to the left of the answer. – Anna_MediaGirl Dec 22 '12 at 6:23
2

you could:

  1. style the systems message template
  2. use an addon called custom system messages
  3. or look for an AJAX way to do it. the last one is the most elegant, i however, with my limited javascript skills have not yet been able to do it
| improve this answer | |
  • 2
    Hi Jelle many thanks for this. I have actually gone ahead and used the ' Custom System Messages ' third-party module and created a custom template page for now. – Karl Bowers Dec 19 '12 at 13:00
0

I haven't used this module but if there is a CSS class for the grey message box, you can hide it with CSS using .classname { display:none }.

| improve this answer | |
  • 1
    Hi Anna, yes I may look into the CSS hide option. To be honest though I just don't want the user to leave the page they are on, so I may look further into an AJAX option on this. Many thanks for the feedback :-) – Karl Bowers Dec 19 '12 at 13:02
0

I seem to have got round it by using Jquery to load the page into a new iFrame. I haven't tested it fully though.

I added a click handler to the link with this code:

$('a.close-cookie-policy').click(function(){
  var thisLink = $(this).attr('href');

  $('<iframe>', {
    src: thisLink,
    id:  'cookie-frame',
    frameborder: 0,
    width: 0,
    height: 0,
    scrolling: 'no'
  }).appendTo('body');

  $('.cookie-policy').fadeOut('slow');

  return false;
});
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.