-
Elie TodjomHas successfully completed the online course Basics (100)2 years ago #33989
Hello,
I’m trying to use manual binding on Css Text. I have a css class in my Editor.
.groupColorText{
color: red!important;
}In the Text Widget I did this in the CSSClasses Property:
{=${variableHolder>Difference} !== ‘0’ ? ‘groupColorText’ : ” }}
please is it something wrong in my code? It is not working but when I just use ‘groupColorText’ in the css Classe it is working fine.
Thanks.
Jennifer HäfnerHas successfully completed the online course Intermediate (200)Has successfully completed the online course Advanced (300)Has successfully completed the online course Basics (100)Has successfully completed the online course Advanced (310)Has successfully completed the online course Advanced (320)Has successfully completed the Intermediate CertificationHas successfully completed the Advanced Certification2 years ago #33991::Hi Elie,
At the end of your expression binding, there is one too many curly braces, so just delete the last curly brace.
If the expression binding still does not work, here are some suggestions:
- Have you already checked the value that is contained in ‘Difference’? You are comparing it to the string value ‘0’, maybe this needs to be changed to an integer?
- Is ‘Difference’ the name of a global variable or the path in a binding? If it is a global variable, containing for example a single value, the syntax needs to be changed to: ${variableHolder>/Difference}.
If the text widgets are in a list or a table and ‘Difference’ is a field of the global variable that is mapped to the list/table, your syntax here is correct. - It seems like you are using different kinds of apostrophes in your expression binding. This could be problematic, so just to make sure, exchange the apostrophes:
{= ${variableHolder>Difference} !== ‘0’ ? ‘groupColorText’ : ” }
Jennifer HäfnerHas successfully completed the online course Intermediate (200)Has successfully completed the online course Advanced (300)Has successfully completed the online course Basics (100)Has successfully completed the online course Advanced (310)Has successfully completed the online course Advanced (320)Has successfully completed the Intermediate CertificationHas successfully completed the Advanced Certification
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.