Using filters in if tag example is misleading
|Reported by:||Owned by:||nobody|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
In the template language documentation, there is an example where the length filter is used in an if tag where a list's length is compared to 1. It starts with "You can also use filters and various operators in the if tag..."
Since the filter returns a string and the comparison will be a string comparison, this basically works in the example but anything more complicated is likely to fail. I think it would be helpful if a caveat was written into this example that made this clear.
Change History (6)
comment:1 Changed 4 years ago by
|Component:||Uncategorized → Documentation|
|Patch needs improvement:||unset|
|Type:||Uncategorized → Bug|