Winston Chen
Winston Chen

Reputation: 6879

What's a good way to separate html/xml codes from lift snippet?

Lift is a fun web framework to work with. However, it's really hard for newbies to get the html/xml codes out of snippet codes. Is there a recommended way to do it?

Upvotes: 1

Views: 164

Answers (2)

Alex
Alex

Reputation: 9448

Just

  • try to keep the ammount of snippet html as small as possible. For example if there is some static code inside your snippet you dont need there you could just move it into the html file.

and

  • try to keep it style independent such that the frontend designer can do his job just by editing the html/css/js files.

Upvotes: 2

David Pollak
David Pollak

Reputation: 7015

If you use the CSS Selector Transforms (please see http://simply.liftweb.net/index-7.10.html#toc-Section-7.10 ) rather than the Helpers.bind() stuff, you'll find little or no markup in your Scala code.

Thanks.

Upvotes: 4

Related Questions