Set title for EntriesR

This commit is contained in:
Danielle McLean 2017-10-09 10:08:23 +11:00
parent c554715df7
commit 2fd0ff850b
Signed by: 00dani
GPG key ID: 5A5D2D1AFF12EEC5

View file

@ -13,7 +13,9 @@ import Widget.Feed ( hFeed )
getEntriesR :: K.EntryKind -> Handler Html getEntriesR :: K.EntryKind -> Handler Html
getEntriesR kind = do getEntriesR kind = do
entries <- runDB $ selectList [EntryKind ==. kind] [Desc EntryPublished] 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 :: K.EntryKind -> Slug -> Entry -> Bool
checkMatching kind slug entry = (kind == entryKind entry) && (slug == entrySlug entry) checkMatching kind slug entry = (kind == entryKind entry) && (slug == entrySlug entry)