I am currently trying to change the background color of cards within my cards region and am having little to no success changing the entire background. It would be great if the color would mimic a specific column value in the source table
❇️ OrclQA.Com is a question and answer forum for programmers.
❇️ Here anyone can ask questions and anyone can answer to help others.
❇️ It hardly takes a minute to sign up and it is 100% FREE.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
OrclQA.Com is a question and answer forum for programmers.
Here anyone can ask questions and anyone can answer to help others.
It hardly takes a minute to sign up and it is 100% FREE.
apexgeek
First, determine which column in your source table you want to use for color coding. For example, let's say you have a column named
Status
with values like 'New', 'In Progress', and 'Completed'. You might want to assign different colors to these statuses.In your card's region source, modify the SQL query to include a case statement that assigns a CSS class based on the column value. For example:
This SQL query assigns a CSS class (
status-new
,status-in-progress
,status-completed
) based on theStatus
value.In your cards region, you will need to modify the card template to include this new class. Locate the template options and insert the
&STATUS_CLASS.
token where appropriate. Below is the screenshot:Now, add the CSS to define the background colors for these classes. You can add this CSS in the page's inline CSS section or in a separate CSS file included in your application.
Output: