简体   繁体   English

Drupal 7上的视图URL问题

[英]Problems with view URL on drupal 7

I've a problem with my drupal view at path I uses /persons , this works fine. 我在使用/persons路径上的drupal视图有问题,可以正常工作。

http://example.org/persons/ shows the right view, http://example.org/persons/显示正确的视图,

but when I type http://example.org/persons/asdasd it show's my view, too. 但是当我输入http://example.org/persons/asdasd时,它也显示了我的观点。 But I only want to show the view under http://example.org/persons/ 但我只想在http://example.org/persons/下显示视图

How can I avoid that problem or is there some setting I've missed? 如何避免该问题,或者我错过了某些设置?

Here is what you can do: 您可以执行以下操作:

Edit the view and open Advanced , on the right top 编辑视图并打开右上方的Advanced(高级) 编辑视图并在右上方打开**高级**

Add a contextual filter: Global: Null 添加上下文过滤器: 全局:空 添加上下文过滤器:**全局:空**

Tick 'Display all results', Click More at the bottom and tick 'Fail basic validation if any argument is given' 勾选“显示所有结果”,单击底部的“ 更多 ”,然后勾选“如果给出任何参数则失败基本验证” 勾选“显示所有结果”,点击底部的“更多”,然后勾选“如果给出任何参数,则无法通过基本验证” **

Now, if you put anything in front of the url, it will give you a 404 page 现在,如果您在url前面放置任何内容,它将为您提供404页面

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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