Drupal 视图路径和分类术语

Drupal view path and taxonomy term

我有两个分类词典:位置、类型。 我需要查看路径类似于 show/location/type 并查看特定位置和类型的显示

听起来您可能想在您的视图中(在高级选项卡中)使用 contextual filters。这样您应该能够将过滤器值传递给视图路径中的视图。

根据您要实现的目标,您可能需要尝试不同的设置。如果我理解正确并且你在视图路径中的 "location" 和 "type" 是术语名称,你将需要这样的东西:

  • 在 "Provide default value" select 来自 URL 的原始值和路径组件
  • 表格下"When the filter value IS in the URL or a default is provided"select选项"Specify validation criteria"
  • Select "Taxonomy Term" 作为验证者
  • Select 你的词汇量
  • 下"Filter Value Type"select"Term name converted to term ID"
  • 勾选"Transform dashes in URL to spaces in term name filter values"