In the code above if I am at the root ‘/’ it should display the white image, otherwise the red. I would also like to be able to add more pages to have the white image with an OR in the if check.
Why you don’t add a variable for logo image in your page’s header?
If there is no logo selected, no logo is shown, otherwise the selected logo is shown.
I don’t want to not display an image, I would like to have a different image for the link depending the page displayed.
I have a base.html.twig which has an include for navigation.html.twig. In navigation.html.twig, I have the standard macro loop that comes with the Antimatter theme that builds a nav bar from all pages.
For one of the pages, I use an image instead of text and this image is either white when on certain pages (because the nav bar is styled red, and red on others because the nav bar is style white.