For some reason I am incapable of remembering that it's lift:embed and not lift:include, so I'm writing it down. Along the same lines, I can never remember how to change the evaluation order of a snippet call (is it even called a 'snippet call'?). Examples follow.
Embedding a fragment of HTML in a template
<lift:embed what="path/to/fragment"/> <!-- DO NOT add .html to the what= part what= is relative to src/main/webapp in source tree -->
Embedding a fragment of HTML containing lift bindings in a template
<lift:MySnippet.foo eager_eval="true"> <lift:embed what="path/to/fragment_with_bindings"/> </lift:MySnippet.foo>
References
- Mailing list thread about embedding HTML fragments in Scala Lift
- Eager evaluation in the Lift Book
Hey Mark,
ReplyDeleteI was working on project of comparing dslr's and stumbled upon snapsort.com and was really impressed with the content you provide. Wanted to get in touch with you guys. Is it possible.
Thanks,
Amit
Hi, Amit. Thanks for the comment. Send me an email: mark at snapsort . com and we'll discuss there (rather than here in Blogger comments). Thanks.
ReplyDeleteHey Mark,
ReplyDeleteI sent you an email. Did you receive that ?
Thanks,
Amit