Drupal Views 根据分类页面 URL 阻止内容
我有一个 URL example.com/east-midlands,它是标有“East Midlands”一词的所有节点的列表。
东米德兰兹是多个子术语(城镇和城市)的父术语。
我想创建一个块,当您访问上述 URL 时,该块将列出这些子术语(作为链接)。
我将如何去做这件事。我假设视图会渗透到此中,但我已经碰壁了!
非常感谢,
Steve
进一步解释一下...
分类词汇是:
Region 1
- Area 1
- City 1
- City 2
- Area 2
- City 3
- City 4
Region 2
等等...
如果您在 URL example.com/region-1/area-1 上,则块中显示的分类术语应为 City 1和城市 2。如果您访问 URL example.com/region-1/area-2,则块中显示的分类术语应为城市 3 和城市 4。
希望这更清楚。
S
I have a URL example.com/east-midlands which is a list of all nodes tagged with the term East Midlands.
East Midlands is the parent of several child terms (towns and cities).
I want to create a block that will list these child terms (as links) when you are on the above URL.
How would I go about doing this. I'm assuming Views will creep into this but I've hit a brick wall!
Many Thanks,
Steve
To explain a bit further...
The taxonomy vocabulary is:
Region 1
- Area 1
- City 1
- City 2
- Area 2
- City 3
- City 4
Region 2
And so on...
If you are on URL example.com/region-1/area-1 the taxonomy terms displayed in the block should be City 1 and City 2. If you are on URL example.com/region-1/area-2 the taxonomy terms displayed in the block should be City 3 and City 4.
Hope this is clearer.
S
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
1 - 启用“视图模块”并转到视图页面 http://example.com/admin/struct/views
2 - 点击“添加新视图”==>插入您查看页面的名称==>单击“继续并编辑”
3 - 单击“添加”==>选择“阻止”==>单击“过滤条件”第
4 部分中的“添加” - 选择“内容:具有分类术语”==>单击“添加并配置过滤条件”
5 - 单击“应用并继续”==>并在自动完成字段中写入术语名称
6 - 应用所有设置后单击“保存”,您会发现生成了一个新块,
我希望这会对您有所帮助,如果我错过了某些内容或者如果我没有正确理解您,我很抱歉
1 - Enable "views module" and go to views page http://example.com/admin/structure/views
2 - click on "Add new view" ==> insert the name of ur view page ==> click on "Continue & edit"
3 - click on "add" ==> select "block" ==> click on "add" in the "FILTER CRITERIA" Part
4 - select "Content: Has taxonomy term" ==> click on "Add and configure filter criteria"
5 - click "apply and continue" ==> and write the term name in the auto complete field
6 - after apply all settings click save and you will find a new block generated
i hope that will help u and im sorry if i missed something or if i didn't understand u correctrly