[web-devel] How exactly do you add cassius files to a hamlet template?

Ian Duncan iand675 at gmail.com
Thu Feb 17 23:28:15 CET 2011


On Thursday, February 17, 2011 at 4:16 PM, Ian Duncan wrote:
I assumed that I could change: 
> 
> defaultLayout widget = do
> mmsg <- getMessage
> pc <- widgetToPageContent $ do
> widget
> addCassius $(Settings.cassiusFile "default-layout")
> hamletToRepHtml $(Settings.hamletFile "default-layout")
> 
> To:
> 
> defaultLayout widget = do
> mmsg <- getMessage
> pc <- widgetToPageContent $ do
> widget
> addCassius $(Settings.cassiusFile "other-stuff")
> addCassius $(Settings.cassiusFile "default-layout")
> hamletToRepHtml $(Settings.hamletFile "default-layout")
> 
> And that it would minify other-stuff.cassius and include it, but this is clearly wrong. I also tried this:
> 
> defaultLayout widget = do
> mmsg <- getMessage
> pc <- widgetToPageContent $ do
> widget
> addCassius $(Settings.cassiusFile "other-stuff")
> hamletToRepHtml $(Settings.hamletFile "default-layout")
> 
> 
> Replacing default-layout completely, and it didn't work either. What am I doing wrong here?-- 
> Ian Duncan
> 
>  Actually, turns out it's a bug in Cassius. It apparently ignores any non-indented declarations, even if they are within curly braces. Solved it by reformatting by cassius code. Filing a bug report on the Hamlet package.
-- 
Ian Duncan


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/web-devel/attachments/20110217/97cbc96c/attachment-0001.htm>


More information about the web-devel mailing list