ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

How to prompt visitors to log in?

February 09, 2011 1:45am

Subscribe [2]
  • #1 / Feb 09, 2011 1:45am

    manny2000

    10 posts

    Hi guys this might be a stupid question as i’m fairly new to EE but anyway here’s what i’m trying to achieve:

    In the ‘edit member group’ i’ve changed the site access for guests to ‘no’. So now when i visit the site as a guest i get to see the message ‘system offline’ which is the template found in the ‘design>message pages>offline template’ Now; instead of displaying this i would like to show a login form to visitors so members can sign in and view the website.

    I’ve tried using :http://ellislab.com/expressionengine/user-guide/modules/member/login_form.html but with no success

    Can anyone tell me how i should go about doing this?

    Cheers.

    Manny.

  • #2 / Feb 09, 2011 3:37am

    Ingmar

    29245 posts

    Do let them access the template, but use

    {if logged_in}
    ...
    {/if}

    and

    {if logged_out}
    ...
    {/if}

    to determine what they get to see.(Docs)

  • #3 / Feb 09, 2011 4:16am

    manny2000

    10 posts

    This looks like something i can use 😊

    but… (silly question) where do i put these conditions? Would you have an example, sorry i’m still learning!

    Thanks.

  • #4 / Feb 09, 2011 4:25am

    manny2000

    10 posts

    Ok so i should have played around with it before asking 😛

    I put it in the index template and it seams to be working, do i have to put in in every template to prevent people bipassing the home page?

  • #5 / Feb 09, 2011 7:13am

    manny2000

    10 posts

    oh also, if anyone has any tips or tutorials on how to style the default appearance of the ‘welcome back to the site’ message and the ‘log out’ button, would be much appreciated.

    Cheers.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases