I have been looking for documentation on variables that I can use in twig for my template, and there doesn’t seem to be much available. I figured, based on how the login plugin displays
welcome {{ grav.user.username }}
I would be able to use that variable, but I can’t seem to get any output from it. I am logged in as a super user, and am really trying to get a true or false if the current user has access to the admin panel, that way I can create a link in the header to take me there without having to type /admin in the address bar everytime. However, I can’t even get it to output my username. Am I using this wrong?
I tried in my theme to insert
<pre> {{ dump(grav.user) }} </pre>
and that got me nowhere. Any advice?
Thanks,
-Josh-