-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Using filters in tags #57
Comments
Can you use the
|
I tried that, but it saved the rsult as a string so the if statement could not do the comparison. Is there something I can do to get liquid to see a string as a number? |
Hmm; it doesn't look like it, at least not using that kind of syntax and approach. As you say, A kludge that might work would be to define a filter called something like
Slightly less of a kludge might be to add a Another option is the following hack:
I agree, though, that it would be useful if the syntax was a bit more flexible and didn't require these hacks. |
Thanks, I'll give those a try. I agree that they are "kludgy". I cannot modify or define anything because this is all being uploaded to github and they control jekyll, not me. :-( I don't know if it's practical or not, but having tags be able to run embedded filters or at least have capture set a type appropriate to the return value would be really useful. |
I want to be able to use a filter inside a {% if expression %}. I've tried all sorts of things but cannot figure out if it's possible. Here is what I've tried:
Have I got the syntax wrong? or is this supported? or is there a bug?
The text was updated successfully, but these errors were encountered: