Twig if else using page as condition

Hi there,

I’m trying to edit the base.html.twig so that the home page shows a certain logo and all other pages show another. I tried using an if else statement, but am not sure how to call a page within the statement…have tried for example:

 {% if title == home %}
 <h3><a href="{{ base_url == '' ? '/' : base_url }}"><img src="{{ url('theme://images/logowhite.png') }}" /></a></h3>
{% else %}
<h3><a href="{{ base_url == '' ? '/' : base_url }}"><img src="{{ url('theme://images/logo.png') }}" /></a></h3>
{% endif %}

but end up with the same logo (logowhite) on all pages, not only the homepage.

Any pointers will be really appreciated :=)

I wanted to do something similar but with content for the home page only which I did something like this

    logo code
{% else %}
   blah blah
{% endif %}

Another way might be to filter on the template type if your homepage happens to have a specific one e.g.

            logo code
{% else %}
{% endif %}

Also the using the dump command along with the grav debugger will tell you what “title” is actually outputting.

Thank you so much, it worked.