Copyright | (c) digitally induced GmbH 2021 |
---|---|
Safe Haskell | None |
Synopsis
- setTitle :: (?context :: ControllerContext) => Text -> IO ()
- setDescription :: (?context :: ControllerContext) => Text -> IO ()
- setOGTitle :: (?context :: ControllerContext) => Text -> IO ()
- setOGType :: (?context :: ControllerContext) => Text -> IO ()
- setOGDescription :: (?context :: ControllerContext) => Text -> IO ()
- setOGUrl :: (?context :: ControllerContext) => Text -> IO ()
- setOGImage :: (?context :: ControllerContext) => Text -> IO ()
Documentation
setTitle :: (?context :: ControllerContext) => Text -> IO () Source #
Sets the page title. Can be accessed using '{pageTitle}' inside your Layout.hs
.
Example:
action ShowProjectAction { projectId } = do project <- fetch projectId setTitle (project.title)
Inside your layout use it like:
defaultLayout :: Html -> Html defaultLayout inner = [hsx| <head> <title>{pageTitle}</title> </head> |]
setDescription :: (?context :: ControllerContext) => Text -> IO () Source #
setOGTitle :: (?context :: ControllerContext) => Text -> IO () Source #
setOGDescription :: (?context :: ControllerContext) => Text -> IO () Source #
setOGImage :: (?context :: ControllerContext) => Text -> IO () Source #