From 2fd0ff850b8ce5b7d6375a132f481c827a0f5deb Mon Sep 17 00:00:00 2001 From: Danielle McLean Date: Mon, 9 Oct 2017 10:08:23 +1100 Subject: [PATCH] Set title for EntriesR --- src/Handler/Entries.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Handler/Entries.hs b/src/Handler/Entries.hs index ca96624..a589280 100644 --- a/src/Handler/Entries.hs +++ b/src/Handler/Entries.hs @@ -13,7 +13,9 @@ import Widget.Feed ( hFeed ) getEntriesR :: K.EntryKind -> Handler Html getEntriesR kind = do entries <- runDB $ selectList [EntryKind ==. kind] [Desc EntryPublished] - defaultLayout $(widgetFile "entries") + defaultLayout $ do + setTitle . toHtml . K.pluralise $ kind + $(widgetFile "entries") checkMatching :: K.EntryKind -> Slug -> Entry -> Bool checkMatching kind slug entry = (kind == entryKind entry) && (slug == entrySlug entry)