Open thybzi opened 8 years ago
:+1:
Which syntax variant are you going to implement?
I'm not sure. I'm not even certain that we will implement this feature exactly, vs. other ways of improving include/extends. I think if we do build something, the most likely option would be something like:
include(arg1='some value' arg2=true arg3=42) my-block
but I was mostly just tagging this issue to be reviewed once 2.0.0 is stabilised and released.
Reading endless stackoverflow topics and tickets like #798 or #1692, all concerning "how to pass parameters to include", I've come to idea.
How is about making shortcut of:
in the following format?
Or maybe even more consistent way — another way of shortcut, making:
from the following format (my personal favorite, auto-translating filename to contained mixin name, or just getting first containing mixin):
or, if you prefer:
or:
or (my less favorite, but still better that currently available variants):
Main purpose in to provide a simple, readable and SINGLE-LINE way of including component templates.
Possible use-case:
and in
social-button.jade
: