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.
Asked
Active
Viewed 58 times
1 Answers
4
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).

Michael Snoyman
- 31,100
- 3
- 48
- 77