简体   繁体   English

Drupal 7 如何限制块显示在 URL 路径以特定关键字开头的所有页面

[英]Drupal 7 How to restrict the block from display for all pages where the URL path starts with a particular keyword

I am currently using Drupal 7 and I want to restrict blocks for few pages example:我目前正在使用 Drupal 7,我想限制几个页面的块示例:

example.com/abcd    
example.com/abcf    
example.com/abch    
example.com/abce/xyz    
I want to hide the block which has the /abc* 

(where * could be any character after abc). (其中 * 可以是 abc 之后的任何字符)。

I have tried it by adding example.com/abc* in visibility setting => restrict to certain pages=> all pages except those listed.我已经通过在可见性设置中添加 example.com/abc* => 限制到某些页面 => 列出的所有页面来尝试它。 This is not working这不起作用

Unfortunately, you have to add each line, no need to add the full url:不幸的是,您必须添加每一行,无需添加完整的 url:

abcd A B C D
abcf ABCF
abch abch
abce/* abce/*

You need to only add the relative path in the visibility settings and it should work.您只需要在可见性设置中添加相对路径,它应该可以工作。 Eg just abc*例如只是abc*

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

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