简体   繁体   中英

Drupal 7 list users with taxonomy term using Views and Pathauto

I am attempting to create a taxonomy term page to display users tagged with a vocabulary "expertise" and not having much luck.

I'm using pathauto to alias the taxonomy term pages with the following pattern: [term:vocabulary]/[term:name] .

I then have a Views page for Users with the path set to /expertise/% and a contextual filter on "User: Expertise" (my taxonomy term field). The filter takes the default value of "Taxonomy term ID from URL" and validates as a taxonomy term from the "Expertise" vocabulary.

However, if I then go to (for example) /expertise/php I appear to be getting the standard Drupal taxonomy page rather than the View page setup and see no user results.

Any ideas how I can fix this? I have several taxonomies in use for both nodes and users so need to be able to distinguish between the vocabularies using the aliasing described above.

That's what a contextual filter does... it takes over every page.

I'm confused as to why you aliased the term pages at all... it seems like you don't want to dispaly them, so why not just forget about the alias and set the view page to the url you want it to be at?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM