For example, If a nobody is logged in, I want to show them links to where they can sign up or log back in, but if a user is logged in, I want a way to let them access their profile and other information.
You need to use maybeAuth from the Haskell code to get the auth information, then $maybe inside Hamlet to change behavior based on that result. You can't do maybeAuth from inside Hamlet, since Hamlet does not allow you to perform any actions (like database lookups).
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more