tags:

views:

53

answers:

2

I'm currently building a site where I want anonymous users to see a page which talks about what the site is about, but shows no content. It only offers two options

  1. Register
  2. Login (username & password field)

Once the user logs in, they should be redirected to a specific frontpage.

  1. I tried using drupal/front module, but that did not work. Anynmous access was always shown as access denied
  2. I think I could LoginToboggan to redirect authenticated users but not sure what to do about the frontpage.

thanks

A: 

Make sure that the page you are redirecting to is accessible for anonymous users. The most likely reason for your acess denied message is that anonymous users do not have permission for that page.

You could also try the Rules module to redirect after login.

Fabian
+1  A: 

When you say that you want the front page to show now content you really just mean you only want to show static copy right?

One way to do this is with views and the context module.

Create blocks with views of the content that you want to hide.

Create some regular blocks from the blocks menu.

The magic happens with the context module. It lets you set up custom rules for which blocks to display where and when. You can set it so that some blocks show up for anon users and other blocks show up for authenticated.

Set it up so that the static copy that talks about the site shows up for anon users along with the login block.

You can tell context module load whatever content you need on the home page with views generated with blocks.

Set up context module to load all of your blocks for you instead of drupal's core block system. I'm sure you could do this somehow with panels too, but I couldn't tell you how.

Brian Danowski
thansks very much for the help. Iprobably being daft here, but I cant find the rile in contexts to display based on a users role ? Can you point me in the right direction. :)
Ankh2054
I found it, must of had an old version of context ,new once has the option :)
Ankh2054

related questions