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.

serving content based on member group

February 11, 2008 7:37am

Subscribe [1]
  • #1 / Feb 11, 2008 7:37am

    Kerim Satirli

    52 posts

    good afternoon EE’eers,

    first of all, let me state that I have gone thru the docs and tried to find an answer, but I could not come up with a valid solution.

    the problem is as follows: I have a section called “handouts”. The actual handouts that are to be made available via that section are personalized to the end user and I would like to have a generic URL available for all users, say domain.com/handouts/

    the idea: a user goes to domain.com and logs in, then clicks on “handouts” and is presented with his (or her) very own handout. no special deep links, no extras, just a smart template that takes the member_id / member_group_id / group_id of the user and outputs the content of the template based on that.

    now, I know that I could do this by hard-coding the content inside the index template of the “handouts” group, but that somehow defeats the purpose of a CMS, so I am hoping that someone has a better solution, I’d really appreciate that 😊

  • #2 / Feb 11, 2008 8:21am

    Kerim Satirli

    52 posts

    I think I figured out one way:

    * make sure the group of the user is included in the multi-author drop-down

    * create a template:

    {exp:weblog:entries weblog="clients" limit="15" author_id="CURRENT_USER"}
    Title: {title}
    
    
    Content: {client-body}
    {/exp:weblog:entries}

    this will display all entries from the current user.

    * create an entry and set the author to the user you want said entry to see

    its not pretty, but it works 😊

  • #3 / Feb 11, 2008 12:42pm

    Robin Sowell

    13255 posts

    That’s actually not bad.  It assumes a handout can only be associated with a single member.  But if that’s the case- it really isn’t a bad way to go.  Otherwise, I’d make the users categories, or maybe put them in a dropdown or text field.  But neither of those is any easier than what you’re doing.  So if it’s ok to have the author in there as the member the handout is for AND you only want a single handout->single member relationship, I say go with it.

  • #4 / Feb 11, 2008 12:47pm

    Kerim Satirli

    52 posts

    thanks for the additional thoughts Robin,

    you are correct in as that a handout is for a single member only and I played a bit with categories, but all of them add additional data to the whole thing that is not needed, this just works 😊

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

ExpressionEngine News!

#eecms, #events, #releases