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.

Is it possible?

June 24, 2011 11:33pm

Subscribe [5]
  • #1 / Jun 24, 2011 11:33pm

    Klauss

    33 posts

    Hello there,

    I want to create a website where people login and they find a page with a specific data on it. That data should be different for each user. Also editable .I managed the login system with {if logged_in} but from here i got ... Stuck. I am thinking for something related to member id?

    And if it is possible, Would be pleased to write a short description?

    Moved to Community Help forum by Moderator

  • #2 / Jun 25, 2011 7:20am

    Matt:P

    277 posts

    Hi Klauss

    Well done for getting that far! Could you explain a little more about how you would like the content to differ for each member?

    Matt

  • #3 / Jun 25, 2011 7:29am

    Klauss

    33 posts

    Yes. I would like to have a number of Users. Lets say user1 , user2 , user3. Equal in rights.

    And when yu enter on the Page they will see the login form. They login and get to main page. But the main page must have different content for every user . ]

    example user1 one login , he sees on the main page : art informations
    if the user2 login , he sees on the mainpage : informatics infos.

  • #4 / Jun 25, 2011 8:12am

    Matt:P

    277 posts

    Hi Klauss

    I understand. In your example, the conditional content is set PER USER. To do this you could use the following (simplified) code…

    {if username == "user1"}
    
      Art info…
    
    {/if}
    
    {if username == "user2"}
    
      Informatics info…
    
    {/if}

    However the problem with the above is that EACH USER would require their own if-statement. You can imagine how labour intensive that would be.

    More info on EE’s conditional statements here: http://ellislab.com/expressionengine/user-guide/templates/globals/conditionals.html

    ————

    Thankfully you can achieve a similar effect using Member Groups. i.e. One Member Group named: “Art” (group 5) and another named: “Informatics” (group 6). Individual members would then belong to a single Member Group.

    The EE code is slightly different…

    {if member_group == '5'}
    
      Art info…
    
    {/if}
    
    {if member_group == '6'}
    
      Informatics info…
    
    {/if}

    ————

    A last idea I had was to allow a member to CHOOSE a value when they sign-up using a Custom Member Field.

    You can read more here…
    http://ellislab.com/expressionengine/user-guide/cp/members/custom_member_fields_edit.html

  • #5 / Jun 25, 2011 8:23am

    Klauss

    33 posts

    Thank you !

    That statement is verry usefull. I will make a system with it and let you know how things are going on.

  • #6 / Jun 27, 2011 1:26am

    Marcus Neto

    1005 posts

    Klauss,

    I’ll also through switchee into the mix (http://devot-ee.com/add-ons/switchee/). Works similar to if/then statements native to EE but allows you to use Select Case.

    Do you consider this question resolved?

  • #7 / Jun 27, 2011 3:01am

    Klauss

    33 posts

    not yet. Those are basicly coding methods , there ust be way to a great loop. still working on it

  • #8 / Jun 27, 2011 3:16am

    narration

    773 posts

    Klauss, there’s one further point you may want to consider.

    If I understand what you wish, I think:

    - you may (later) have many members
    - but you probably have only a limited number of sets of content for them

    Thus, you may want to set up a Member Custom Field to decide which content type each Member should receive.

    The documentation is here.

    Note that you can use the field settings, to decide if the member can choose their content type, or whether that’s something only set by the administrator.

    From the field value, then, you can use a string of if-/if, or probably better, the Switchee that Marcus recommends to code the content delivery choices, in EE’s type of coding environment.

    Regards,
    Clive

  • #9 / Jun 27, 2011 4:10am

    Matt:P

    277 posts

    Thus, you may want to set up a Member Custom Field to decide which content type each Member should receive.

    The documentation is here.

    Exactly right. I would definately lean towards this method if each member needed to choose the content they could see.

    Thanks for confirming Clive 😊

  • #10 / Jun 27, 2011 4:15am

    narration

    773 posts

    Apologies, Matt:P.  I hadn’t noticed that you’d mentioned this, and was mainly concentrating on being clear for Klauss working perhaps across German and English. As I had a lot of practice in going the other way, once 😉

    Regards,
    Clive

  • #11 / Jun 27, 2011 6:00am

    Klauss

    33 posts

    ok so , the site is : http://www.my-site-status.com

    As you can understand from the name , a member logins with his credits and what he sees is only his site status information / details. Also in His “panel” must have must have a Send a message Page and other 2 more pages, that will be the same for each member

  • #12 / Jun 27, 2011 6:37am

    Matt:P

    277 posts

    It’s all good Clive! I love it when people confirm solutions to questions 😊 It confirms we’re on the right track.

  • #13 / Jun 27, 2011 7:18am

    narration

    773 posts

    Matt:P : good!

    Klauss, it’s late here, and I am still up only because of completing the EE design survey, but I am feeling from what you say that there may actually be two nested challenges here.

    a. there is some categorized information that is the same for a number of users, but differing across categories of users.

    b. there is also some individualized unique information, per user.

    I think we suggested approaches for a., and agree that switch-decisioning on a member custom field for the user’s category is a good way to choose that.

    For b., if there’s not so much unique information, and you enter it through EE, then that information also can go in custom member fields. Or alternately in a channel’s custom fields, where you have more flexibility and ability in custom channel fields, and key on a member id.

    If you are instead linking some external-to-EE database tables, you can put the key in a member or channel custom field to guide an exp:query which retrieves it.

    Klauss, probably at this point the official tech support will suggest moving this thread to the Community Help area, as it’s really about application design (patterns). But let’s see what they say.

    Regards, and sleep now,
    Clive

  • #14 / Jun 27, 2011 8:32am

    Sue Crocker

    26054 posts

    Great conversation, guys.. but I agree with Clive. You’ve reached the point where it’s How Do I kind of stuff. Moving to the Community Help forum for additional community support.

  • #15 / Jun 27, 2011 5:55pm

    Klauss

    33 posts

    OK . question. How do i install Switchee? I couldn’t find a tutorial for installing it.

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

ExpressionEngine News!

#eecms, #events, #releases