Hi, I’m try to show various content to a backend user vs visitor.
In my layout, I’ve added this already to get the backend user data.
function onStart() {
$this['user'] = BackendAuth::getUser();
}
To do something in the layout itself, I did this already.
{% if user.is_superuser == 1 %}
admin
{% else %}
visitor
{% endif %}
This is not working for me in OC3.
Anyone an idea/suggestion?