简体   繁体   中英

Problems with view URL on drupal 7

I've a problem with my drupal view at path I uses /persons , this works fine.

http://example.org/persons/ shows the right view,

but when I type http://example.org/persons/asdasd it show's my view, too. But I only want to show the view under 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 编辑视图并在右上方打开**高级**

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

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