embedding hamlet/julius/cassius in a hamlet file

If I add several julius widgets using addJulius $(Settings.juliusFile xxx) addJulius $(Settings.juliusFile yyy) I get a link in the head of my generated html file. is there an easy way to get the plain javascript text either automatically embedded between <script> tags on the generated HTML file or just to extract the text from several julius files and embed it outselves between script tags in hamlet? I tried this: j <- extractBody $ addJulius $(Settings.juliusFile xxx) and including, in the hamlet file: ^{j} but that didn't compile with this erorr: Couldn't match expected type `GGWidget sub a (GHandler sub a) ()' against inferred type `(Route a -> [(String, String)] -> String) -> Html' Max

Yesod 0.8 will include an addJuliusBody function, which should do exactly
what you want. If you need the feature right now, I can send you a link to
the code.
PS: I'm hopeful that 0.8 will be released within the next ten days. It's
looking to have a number of very nice enhancements, with nothing too
earth-shaking, so it should be a good candidate for immediate upgrades.
Michael
On Mon, Apr 4, 2011 at 8:04 AM, Max Cantor
If I add several julius widgets using addJulius $(Settings.juliusFile xxx) addJulius $(Settings.juliusFile yyy) I get a link in the head of my generated html file. is there an easy way to get the plain javascript text either automatically embedded between <script> tags on the generated HTML file or just to extract the text from several julius files and embed it outselves between script tags in hamlet?
I tried this:
j <- extractBody $ addJulius $(Settings.juliusFile xxx)
and including, in the hamlet file:
^{j}
but that didn't compile with this erorr: Couldn't match expected type `GGWidget sub a (GHandler sub a) ()' against inferred type `(Route a -> [(String, String)] -> String) -> Html'
Max _______________________________________________ web-devel mailing list web-devel@haskell.org http://www.haskell.org/mailman/listinfo/web-devel
participants (2)
-
Max Cantor
-
Michael Snoyman