Hello to all the Drupal community. I've recently faced a challenge to visually modify some parts of my view's template for the state when its contextual filter is applied. Some details are as follows:
- I have a View of the articles previews list. Each article has several tag names (taxonomy terms) applied.
- This view has a Contextual filter set up to filter the list based on
the taxonomy Term (tag name). The Term is provided by adding term_id
to URI (like
mysite/blog/12). If no Term is provided - it just prints all articles.
- I have a separate views block with "Featured article" content, which
is placed above my Articles list view and is limited to being visible
mysite/blog" URI. This was made to avoid it from displaying on full articles pages by addressing "
- How can I add some class names to the views TWIG template to indicate that this view has contextual filters applied from URI?
- How can I show the Featured article block on the "
mysite/blog" and "
mysite/blog/TID" pages but not for "