Using filters in if tag example is misleading
|Reported by:||ebrelsford@…||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 3 years ago by ebrelsford@…
- Component changed from Uncategorized to Documentation
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Type changed from Uncategorized to Bug