[web-devel] embedding hamlet/julius/cassius in a hamlet file

Michael Snoyman michael at snoyman.com
Mon Apr 4 07:06:32 CEST 2011


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 <mxcantor at gmail.com> wrote:

> 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 at haskell.org
> http://www.haskell.org/mailman/listinfo/web-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/web-devel/attachments/20110404/28c0446d/attachment-0001.htm>


More information about the web-devel mailing list