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.

Trying to brainstorm how to let 6 different members in same member group see and download the 1 file (out of six) that is assigned to them.

September 27, 2012 10:48am

Subscribe [5]
  • #1 / Sep 27, 2012 10:48am

    5BYFIVE Creative

    159 posts

    I have a site that has a few different member groups that allow those members to only see certain content on the front end. I have conditionals setup in the templates to show that content.

    There’s one section that has a downloadable “Price List” pdf. There is one entry and it has a Channel Files field for uploading the pdf. Currently there is one member group that can see the Price List on the front end. Let’s say there are 100 members in this member group that can see the price list pdf. Now the client wants 6 different Price List pdf’s for 6 different people, the current price list would be available for the remaining 94 members. And they want those people to only see their price list, not the others. What’s the best way for me to set this up? Do I need third-party plugin?

    The only way I can see how to do this currently would be to create 6 new member groups and assign the new groups to the 6 people. Then update all my templates to reflect the new member groups and only show an entry or upload field. Obviously this is a bit of work and won’t be very easy to maintain in the future so I’d like to find a better method if possible. Thanks for any help!

  • #2 / Sep 27, 2012 6:06pm

    xenowebdev

    34 posts

    Hey Mike, quick thought -
    Could you make the pdf file name dynamic for the 6 members by appending member_id/member_name as a suffix, then run this inside your conditional so that the pdf name will change depending on which member is logged in? Only the logged in member would see their own pdf (if/else) the others see the normal named pdf?

  • #3 / Sep 27, 2012 9:58pm

    dodgson

    120 posts

    I have nothing to add here. I just wanted to say that xenowebdev’s idea is brilliant. I’m going to use this on one of my current projects. Great idea.

  • #4 / Sep 28, 2012 8:15am

    John St-Amand

    865 posts

    There is an add-on called entry access that allows you to assign and entry’s permissions to the user level,  if that’s what you’re aiming for.

  • #5 / Sep 28, 2012 10:45am

    Boyink!

    5011 posts

    Are the price lists each one entry in a channel?

    If so, another thought is to set the target member as author of the entry, then at the template level use conditionals to check for one of those 6 people being logged in and if they are only show them entries that they’ve authored. (author_id=“CURRENT_USER”).

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

ExpressionEngine News!

#eecms, #events, #releases