I'm trying to show different content depending on whether a user is logged in or not (things like a login/logout link, etc). With some trial and error I came up with {% if user.id is defined %}, but I was wondering if there is a baked-in twig function for that? Or other useful front-end functions that might not be documented (like login or logout links)?
Some feedback from a new user: I'm having trouble figuring out what I can/can't do in the templates. Since we're forced to use Twig (I understand via Reddit why you do this), I can't dig through the classes very easily to figure out methods to use; it adds a layer that makes it extremely time consuming to figure out how to properly do things. The documentation is pretty to look at, but seems like more of an overview than an API/guide.