πŸ‡¬πŸ‡§United Kingdom @Hodgekins

Account created on 12 May 2011, about 13 years ago
#

Recent comments

πŸ‡¬πŸ‡§United Kingdom Hodgekins

I've been a bit confused by this too. Looking at the code here:

web/core/modules/taxonomy/src/Plugin/views/argument_default/Tid.php

In the getArgument method:

if (!empty($this->options['term_page'])) {
if (($taxonomy_term = $this->routeMatch->getParameter('taxonomy_term')) && $taxonomy_term instanceof TermInterface) {
return $taxonomy_term->id();
}
}

If "Load default filter from term page" is on then the first condition is true.

And then if $this->routeMatch->getParameter('taxonomy_term') is truthy (can be assigned to $taxonomy_term) and is an instance of a taxonomy term then use that tid as an argument.

So I guess this only returns a value when you're on a taxonomy term's page.

Happy to be corrected if I'm inaccurate.

Production build 0.69.0 2024