@frankiewebs
There are many ways to do this, a few ideas:
1. Classes
Add classes to the container where you add the status.
Then create these CSS classes and set the background you want.
2. Inline (Pod templates)
Add inline CSS in the container where you check the status type.
This could be a bit difficult if you have more than 2 status types since you’ll need several IF statements.
2. Inline (PHP templates)
Add inline CSS in the container where you check the status type.
You can simply do a PHP switch statement for this.
Cheers, Jory
Thank you for the reply. For posterity, I’d like to share how I resolved this. I used a Pod template as you recommended. I set my IF statement to check for the field “related_status”, and for each value, set a div class. Then I put all the content inside the div (see below). Then, finally, I used CSS on the page itself to target the div class .stoppage and set background color along with some other stuff.
[if field=”related_status” value=”457″]
<div class=”stoppage”>
<h3>{@name}</h3>
CURRENT STATUS: {@related_status}<br>
STOPPAGE CAUSE: {@stoppage_cause}
PRODUCT: {@related_product}
TEAM LEADER: {@team_leader}
TIME IN CURRENT STATUS: 52:15
</div>
[/if]`
-
This reply was modified 3 years, 10 months ago by
frankiewebs.
-
This reply was modified 3 years, 10 months ago by
frankiewebs.