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

2
  • 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
    Commented Dec 15, 2012 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
    Commented Dec 22, 2012 at 6:23

3 Answers 3

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
1
  • 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. Commented Dec 19, 2012 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 }.

1
  • 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 :-) Commented Dec 19, 2012 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;
});

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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