I understand that twig in content is a lot more restrictive now, for security reasons. So I’m currently doing this in a custom twig template with {% if not grav.user.authenticated %}, but I feel content really should go in the pages and not in a twig template. So what is the clean way to do this now?
Edit: I wrapped the content bits in section tags (named “authenticated” and “unauthenticated” respectively) and plugged those into my custom template. That is so far an acceptable solution, though I would still love to hear if there’s a better way.
Adding to that, how do I show the login form for unauthenticated users? If I put {% include 'partials/login-form.html.twig' } %} in my template, nothing shows up. If I do {% include 'partials/login-form.html.twig' with { show_login_form: true } %}, the remember me checkbox and the buttons turn up, but the username and password fields are still missing. Not sure how I should be doing this…