How can I check the user type for the logged in user on Help center Template code?
Answered
Posted Jul 22, 2021
Hi,
I'm looking for a solution where I'll be showing an option on the Zendesk Guide (Help Center) Template on the header only if the user is an Admin or Agent. However, I'm unable to find the right variable in the template code that shows me the user type.
In the header.hbs code, we have an option to check if the user is signed in or not by variable "signed_in", but we have nothing to check the user type.
One detail I found on the "user_profile_page.hbs" is that it shows user.admin and user.agent, these variables are not accessible on the header. Is there a solution to pull the user Type?
Ref Image of code checking if the user is signed in:
1
9
0 comments
Sign in to leave a comment.