-
Notifications
You must be signed in to change notification settings - Fork 190
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
How can you pass in a literal value from a template into to a filter? #37
Comments
Hi Rob. There is, today, no way to write literals such as strings and numbers in the tag content. I would consider a pull request with the greatest interest. In the meantime, put your format in the data, as in https://gist.github.com/3803707. |
Obsoleted by #54 |
The pull request #54 contains sample code that lets you render, for instance, the following template:
as:
|
@Psybert Check the sample code at #54 (comment) : literals have finally found their solution. |
Yea this looks awesome. Can't wait to try it out! |
trying to do something like this:
{{date_format(date,"yyyy-MM-dd 'at' HH:mm")}}
or
{{#equals(name,"fred")}}this guys name is short for fredrick! {{/}}
I see a path for the second scenario but that involves adding a @{@"fred" : @"fred"} to the context which seems silly.
The text was updated successfully, but these errors were encountered: