css Manual Binding.

  • Evalls
    Participant
      Has successfully completed the online course Basics (100)
    2 years, 9 months 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.

    Evalls
    Participant
      Has successfully completed the online course Basics (100)
    2 years, 9 months ago #33994
    Up
    2
    Down
    ::

    @Jenifer thank you it is working now. I had like you said a curly brace to much and I also change String to an Interger.

     

    Thank You…

    Jennifer Häfner
    Moderator
      Has 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 Certification
      Has successfully completed the Advanced Certification
    2 years, 9 months ago #33991
    Up
    1
    Down
    ::

    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äfner
    Moderator
      Has 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 Certification
      Has successfully completed the Advanced Certification
    2 years, 9 months ago #33992
    Up
    0
    Down
    ::

    I just realized that the forum somehow changes the apostrophes automatically.

    In the attachments, you can see which type of apostrophe I recommend to use (on a German keyboard).

    Attachments:
    You must be logged in to view attached files.
Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.