[more of same thomashartman1@gmail.com**20080910123652] hunk ./templates/templates-dont-repeat-yourself.st 25 -rendering the above content pane by calling +rendering the current content pane by calling hunk ./templates/templates-dont-repeat-yourself.st 32 -
As you may have noticed, the html written by the above command is only the current content pane, not the header or table of content links. To render the full page from ghci, you can do +
To see how this page would look if you were logged in: hunk ./templates/templates-dont-repeat-yourself.st 34 -
*Main> do html <- tutlayout [] "templates-dont-repeat-yourself"; writeFile "output.html" html +
*Main> do templates <- directoryGroup "templates" ; writeFile "output.html" ( renderTemplateGroup templates [("loggedInUser","DarthVader")] "templates-dont-repeat-yourself" )
hunk ./templates/templates-dont-repeat-yourself.st 37
-You're missing the header image and css because you're opening a plain html file
+
+
As you may have noticed, the html written by the above command is only the current content pane, not the header or table of content links. To render the full page from ghci, as it would appear for a logged in user, you can do + +
*Main> do html <- tutlayout [("loggedInUser","DarthVader")] "templates-dont-repeat-yourself"; writeFile "output.html" html + + +
You're missing the header image and css because you're opening a plain html file hunk ./templates/templates-dont-repeat-yourself.st 56 -gets a default value. You can get a sense for how this all works by looking at src/View.hs. +gets a default value. + +
You can get a sense for how this all works by looking at the tutlayout function in src/View.hs.