How to parse multiple body tags in Sitemesh 3

144 views
Skip to first unread message

Shirish Padalkar

unread,
Nov 7, 2012, 11:17:35 PM11/7/12
to siteme...@googlegroups.com
Hi guys,

I have posted a question on StackOverflow about how to parse a document with multiple body, head tags with Sitemesh3. Can you please have a look at it and answer?


Thanks.

With regards,
Shirish Padalkar
http://twitter.com/_Garbage_

daniel...@gmail.com

unread,
Nov 9, 2012, 2:21:33 AM11/9/12
to siteme...@googlegroups.com
Dual posted here and StackOverflow:

If you don't mind extending Sitemesh 3 then this is fairly easy to do by adding support for server side includes in your decorator template. I do exactly this in another library (UtterlyIdle).

I'm using StringTemplate as my decorator language but this should work in Freemarker or any other templating tool. I add in a PageMap and then in my decorator template call

$include("someUrl").body$

This does an include and then parses the output with the Sitemesh 3 engine. This allows you to have as many includes as you like.

Hope that makes sense

Dan

Reply all
Reply to author
Forward
0 new messages