Community

Use views to display text only when condition is met

I'm just starting to work with Views and it is so powerful that I am a bit stuck.

I was able to display in a block, a view that I had set up that shows some fields. One of those fields, let's call it Field-A, is a boolean field with a checkmark for on or off (0 or 1). Everything works great there.

Now I am curious if it is possible to show a view on a page where I have set a condition.

For example, show Field-A only when Field-A is checked for that specific node.

It's hard to explain, but right now I am seeing Field-A on all the pages (nodes) that I have created, including those where I did not check the field.

Any help would be much appreciated!

Comments

If you are using a view you

If you are using a view you can add filter criteria on content (node) type and on the field A

I ended up realizing that

I ended up realizing that views was not a good way to do this. Instead i just created a new field and output that. Then styled it with CSS.