Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By admcconnell on
Quite simply what I would like to do is have a View set up that shows all my content, both published and non-published. But, I want the non-published nodes to show a different background in the table. Is there an easy way to set up this conditional style within a View? Thanks for any help.
Comments
Yep .. it's actually quite
Yep .. it's actually quite easy by using tokens, given the token module is installed.
Save the view. Now you should have a class .status-0 for unpublished and .status-1 for published content on the TR tag which you can use to set a specific color.
:-)
I like cookies!
How to use this with Boolean
How to use this with Boolean field?
Just ran across this 4 year
Just ran across this 4 year-old reply and it just saved my bacon. Thanks!
Drupal 8+
In drupal 8+ this you use twig now instead of tokens like
Views Table Highlighter module
You can use Views Table Highlighter module.
here