solved How do I show different things for different profiles?

BeatRelease
BeatRelease
@beatrelease
10 years ago
43 posts
Hey guys, I'm trying to figure out how to pull this off.

For example, on my administrator page I want to show a custom banner and on one of my staff member pages I want to show another custom banner for that specific user, and a different custom banner to show on all profiles.

What would be the correct coding...if possible?

Thanks
updated by @beatrelease: 09/03/14 09:16:15AM
paul
@paul
10 years ago
4,326 posts
Probably the easiest way is to allocate the 'profile groups' separate quotas, then use the $profile_quota_id variable in the templates to show the different options -
{if $profile_quota_id == 1}
Do This
{elseif $profile_quota_id == 2}
Do That
{else}
Do the Other
{/if}
Put a {debug} in the template first to make sure $profile_quota_id is a valid variable for the template. It might be part of the $_items array if the template you want to modify is a 'row' template.
hth
Pa


--
Paul Asher - JR Developer and System Import Specialist
douglas
@douglas
10 years ago
2,790 posts
If this is going on the profile page, you could check the _profile_id and show the banner that way... ie.

{if $_profile_id == '1'}
Show banner code to the master admin only...
{elseif $_profile_id == '2'}
Show banner code to profile ID 2 only....
{else}
Show banner code to everyone else...
{/if}

Hope this helps,
Douglas


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
paul
@paul
10 years ago
4,326 posts
Ah yes - You did say 'specific user' ;-)
The Douglas solution is probably better in that case.


--
Paul Asher - JR Developer and System Import Specialist
BeatRelease
BeatRelease
@beatrelease
10 years ago
43 posts
douglas:
If this is going on the profile page, you could check the _profile_id and show the banner that way... ie.

{if $_profile_id == '1'}
Show banner code to the master admin only...
{elseif $_profile_id == '2'}
Show banner code to profile ID 2 only....
{else}
Show banner code to everyone else...
{/if}

Hope this helps,
Douglas

This worked perfectly thanks Douglas!!!

Thanks for the help guys, much appreciated.
douglas
@douglas
10 years ago
2,790 posts
Your welcome! :)


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos

Tags