We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
With @model in layout.vash, I can use same layout(.vash) with diff contents(obj) by command:
@model
layout.vash
// command var tpl = vash.compile( layout.vash ); var out1 = tpl(content_obj1); var out2 = tpl(content_obj2); var out3 = tpl(content_obj3);
What if I want to use diff html file in layout.vash? I want to use different file_name.html (a.html, b.html, c.html) by command:
html
file_name.html
// layout.vash ... @html.include(file_name.html, obj) ...
How to do that?
// command var tpl = vash.compile( layout.vash ); var out1 = tpl(a.html???); var out1 = tpl(b.html???); var out1 = tpl(c.html???);
The text was updated successfully, but these errors were encountered:
If you really wanted to do this, switch on something passed into the template:
@switch(name) { case 'a': @html.include('a.html') break; }
var out = tpl({name: 'a'})
Sorry, something went wrong.
No branches or pull requests
With
@model
inlayout.vash
, I can use same layout(.vash) with diff contents(obj) by command:What if I want to use diff
html
file inlayout.vash
?I want to use different
file_name.html
(a.html, b.html, c.html) by command:How to do that?
The text was updated successfully, but these errors were encountered: