Train-ee Client Handoff
ExpressionEngine 2
Back to this add-on's main page
View Other Add-ons From Focus Lab, LLC
Dynamically display data based on Member Group
General
Samuel Allen
|
Posted: 30 January 2011 08:25 PM |
|
|
|
So far this Accessory is amazing! I have one question though, I want to have certain support information appear based on Member Group. EE’s {template tags} don’t work in this space, and I’m a total CI noob. Can anyone point me to some documentation on the best practices for setting up Member-based display rules?
|
|
|
ErikReagan
|
Posted: 31 January 2011 12:45 AM |
# 1
|
|
Developer
|
Hey Samuel
You can do this pretty easily with the user session object. You can run a conditional on the “group_id” against the ID of member group(s) you are using. Something like this:
if ($this->EE->session->userdata['group_id'] == '8') { // this user is in one of my custom member groups so I'll show them "this" }
Here’s a quick link showing you what you can access this way: http://expressionengine.com/user_guide/development/usage/session.html#user_data
|
|
|
ErikReagan
|
Posted: 31 January 2011 12:47 AM |
# 2
|
|
Developer
|
You bet! Let me know if you come across other questions :)
|
|
|
Samuel Allen
|
Posted: 31 January 2011 12:48 AM |
# 3
|
|
|
You rule!! Thanks for the quick and helpful response!
|
|
|