Is there a way to display a different aspect of a page based on the URL?
So for example, on the homepage, I will have a widget that will activate a filtering action on the work. I, of course, don’t want that on any of the other pages. So in my base twig file, I was conceptually thinking of setting up an if else situation. The tricky part is each page has their own widget. So on the contact page, I’ll have a social media widget and on each of the work detail pages I’ll have taxonomies of the project and tools used in the project.
So in theory, (not proper syntax, just thinking out loud.):
{% if page.url == (’/’) %}
include statement_display widget
{% ifelse page.url == (’/work-detail/’) %}
include statement_display widget
{% ifelse page.url == (’/about’) %}
include statement_display widget
{% ifelse page.url == (’/‘contact’) %}
include statement_display widget
{% endif %}
I have tried many ways that i can think of to accomplish this, not working. Any advice on how to implement this?