3
votes

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.

1

1 Answers

4
votes

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).