Commits

Luke Plant committed 5eb5723

Implemented page title in template

Comments (0)

Files changed (2)

src/Blog/Views.hs

   let categories = [ (c, categoryUrl c) | c <- cats ]
   return $ Just $ standardResponseBS $ render $ t `with` [ setAttribute "categories" categories
                                                          , setAttribute "hasCategories" (not . null $ cats)
-
+                                                         , setAttribute "pagetitle" "Categories"
                                                          ]
 
 -- | View that shows posts for an individual category

src/templates/categories.st

     <link rel="StyleSheet" href="/newblog.css" type="text/css" />
     <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
     <!--[if lte IE 6]><link rel="stylesheet" href="/newblog_IE6.css" type="text/css" /><![endif]-->
-    <title>Categories « All Unkept</title>
+    <title>
+      $if(pagetitle)$
+        $pagetitle$ « All Unkept
+      $else$
+        All Unkept
+      $endif$
+    </title>
   </head>
   <body>
     <div id="container">