Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By jadenajair on
I'm sure there's an easy way to do this but can't seem to wrack my brain around it. My site contains sensitive information which I want only for adults use. How can I make a warnign page that once the user has agreed and entered, doesn't show up anymore, and the main page is the home page? I don't want to make the warning page the homepage as they will be directed back there if they click on the logo. I want to logo to go to a normal home page once they have entered.
Comments
For logged in users you have
For logged in users you have terms_of_use, legal, and site_disclaimer modules. If you want an agreement from a user who will not log in, you can use a re-purpose a cookie compliance module like cookiecontrol or eu_cookie_compliance. Best try out a few of the options. Even though they only create a popup, you can make the popup cover the whole screen if you wish.
If the cookie consent is not enough and you need to lock out users from a particular page until they have given consent, you probably need to make custom code. Ideas here http://drupal.stackexchange.com/questions/59638/showing-warning-for-view.... You might also want to make an exception for the googlebot user agent string, otherwise it will kill your SEO.
Digit Professionals specialising in Drupal, WordPress & CiviCRM support for publishers in non-profit and related sectors