Page 1 of 1

Show Link in header for specific user group

Posted: Mon Feb 15, 2010 9:16 am
by adlorenz04
I need to display a link in the header to a custom page for a specific user group. I have in that page the the code which works, but we are going to be adding about 170 separate logins that need to see this link. Is there a way of changing the following if statement from userid to usergroup?

#if($customer.UserID == 104 || $customer.UserID == 234 || $customer.UserID == 4)

Re: Show Link in header for specific user group

Posted: Mon Feb 15, 2010 9:31 am
by mazhar
First of all find out the group id for that specific group by looking at your database's ac_Groups table. For example in example below I am assuming that special group id is 10, you will place your group id in place of 10.

Code: Select all

#if($customer.IsInGroup(10))
<a href="#" target="_blank" >Now Available</a>
#else
Coming Soon
#end

Re: Show Link in header for specific user group

Posted: Mon Feb 15, 2010 9:43 am
by adlorenz04
Thanks for your quick response! Is there a place where these class properties/functions are listed and explained?

Thanks,
Alex