login state and a field condition like to alter a template depending on a content type, let's say article and in-depth article if the user is logged in and if a boolean checkbox field is checked or not.

So how to alter these tree conditions programmatically for let's say the video_embed_filed?

I am new to Drupal 8 and Twig.

Thank you for your replies.

Thank you for your replies.
1.content type specific template would be: node--type-article
2.{% if logged_in %} will return boolean.
3.{% if (node.field_video_embed_filed.value != NUll)  %} or null can e replaced by your condition or you can use kint devel modue for better filtering like: {{ kint(node) }}