I have a template with a dropdown menu. Dropdown contains several options (read links). When one of them is chosen I want the dropdown to be highlighted. To do this I want to check if request path is one of the dropdown menu options.
I.e. say my links inside the dropdown have the urls url1, url2, url2, and I want to do this in template:
{% if request.path in [url1, url2, url3] %}
highlight dropdown menu
{% endif %}
What is the best approach to the problem?