You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is because your_crop is a modifier and json is a modifier, and you currently cannot have more than one modifier on a variable. If this specific use case is to be fixed, then that fundamental change needs to be made to the template parser.
Definitely would love being able to use more than 1 modifier on a variable. Specific scenario:
I want to use :attr_safe to remove HTML tags from a string to display it as plain text. But, when the BR tags are removed, there are no spaces between those words.. So, I want to do a :replace to first replace any BRs with a space character, then :attr_safe to remove the remaining HTML, resulting in a plain text string.
Alternatively, maybe add more options to the existing modifiers so we can do more with them.
Activity
kevincupp commentedon Feb 26, 2019
This is because
your_cropis a modifier andjsonis a modifier, and you currently cannot have more than one modifier on a variable. If this specific use case is to be fixed, then that fundamental change needs to be made to the template parser.[-]JSON variable modifier ignores file image manipulation[/-][+]Allow variables to use multiple modifiers[/+]aasun commentedon Oct 12, 2021
Definitely would love being able to use more than 1 modifier on a variable. Specific scenario:
I want to use :attr_safe to remove HTML tags from a string to display it as plain text. But, when the BR tags are removed, there are no spaces between those words.. So, I want to do a :replace to first replace any BRs with a space character, then :attr_safe to remove the remaining HTML, resulting in a plain text string.
Alternatively, maybe add more options to the existing modifiers so we can do more with them.