Targeting a specific page or template with "if" statement

I’m trying to target different page templates or page types to do a few different things. I guess I’m not writing my twig code properly, though. One template is the main blog page (that shows the summary of posts). I’ve tried several different ways of writing it, usually it just applies the if statement to every page on the site regardless of template.

Not sure about the ‘’ but I guess you can try

{% if page.template == 'blog' %} do the things {% endif %}
1 Like

I tried every combination I could think of but left off the ’ ’ part. That did the trick! Thank you!!!