diff --git a/Network/Gitit/Layout.hs b/Network/Gitit/Layout.hs index 0e7098e92..d7d83ba64 100644 --- a/Network/Gitit/Layout.hs +++ b/Network/Gitit/Layout.hs @@ -38,7 +38,11 @@ import Data.Maybe (isNothing, isJust, fromJust) defaultPageLayout :: PageLayout defaultPageLayout = PageLayout - { pgTitle = "" + { pgPageName = "" + , pgRevision = Nothing + , pgPrintable = False + , pgMessages = [] + , pgTitle = "" , pgScripts = [] , pgShowPageTools = True , pgShowSiteNav = True @@ -50,6 +54,10 @@ defaultPageLayout = PageLayout -- | Returns formatted page formattedPage :: PageLayout -> String -> Params -> Html -> GititServerPart Response formattedPage layout page params htmlContents = do + +-- NOTE: the following are used from params: pRevision, pPrintable, pMessages +-- make these part of PageLayout? and why not page too? + let rev = pRevision params user <- getLoggedInUser base' <- getWikiBase diff --git a/Network/Gitit/Types.hs b/Network/Gitit/Types.hs index 9391adfae..bae58456a 100644 --- a/Network/Gitit/Types.hs +++ b/Network/Gitit/Types.hs @@ -168,7 +168,11 @@ instance HasContext PluginM where -- | Abstract representation of page layout (tabs, scripts, etc.) data PageLayout = PageLayout - { pgTitle :: String + { pgPageName :: String + , pgRevision :: Maybe String + , pgPrintable :: Bool + , pgMessages :: [String] + , pgTitle :: String , pgScripts :: [String] , pgShowPageTools :: Bool , pgShowSiteNav :: Bool