Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow compilation of static html instead of gsp #6

Open
divideby0 opened this issue Aug 17, 2011 · 1 comment
Open

allow compilation of static html instead of gsp #6

divideby0 opened this issue Aug 17, 2011 · 1 comment

Comments

@divideby0
Copy link

firstly, this plugin is great. i've used it quite heavily over the last couple weeks and i'm really loving haml. however, i do have one request:

in my app, i'm making use of jquery templates. to embed a client-side bound variable in a jquery template, i do something like this:

<span><%= someVariableName %></span>

or

<span>${someVariableName}</span>

Unfortunately, both of these markups are overloaded by JSP and GSP server-side bindings. So, I'd like to option to compile my haml as a simple static html file instead, bypassing the whole GSP rendering phase.

Alternatively, if you have any suggestions on how I might escape the markup so that its passed through directly to the browser, that would also solve my immediate use case.

@raymyers
Copy link
Owner

Hmm, yeah GSPs make it a bit hard to escape those characters. You might try something like this:

<span><%= '${someVariableName}' %></span>

Or, from Haml

%span= '${someVariableName}'

Note the single quotes for the string literal prevent groovy interpolation.

I don't have a Grails project handy at the moment; let me know if that works.

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants