Is there a way to check the current page using a twig if statement? For example, I want to show a certain header on the home page (home.md w/ home.twig.html) and then use a different header on all other pages. In the base.html.twig file, I wish to put something like this
{% block header %}
{% if page == home %}
{% include "partials/header_home.html.twig %}
{% elseif %}
{% include "partials/header_alt.html.twig %}
{% endif %}
{% endblock %}
I'm having trouble with the {% if page == home %} section. How do you check the current page and how to you specify certain pages (in this case, the home page)? If there is an alternative method, I would be willing to try it. But either way, I'd still like to know how to check for current page and how to specify certain pages in twig. I've looked up some examples, but couldn't get it to work!