使Drupal块对整个站点部分可见,但对特定的子部分或页面不可见
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了使Drupal块对整个站点部分可见,但对特定的子部分或页面不可见相关的知识,希望对你有一定的参考价值。
<?php /* a list a pages to include in standard block include/exclude format (one per line) */ $include = "some/site/section/* another/page/here node/34"; /* a list a pages to exclude in standard block include/exclude format (one per line) */ $exclude = "some/site/section/page1 some/site/section/page2"; /* ----------- DO NOT TOUCH ANYTHING BELOW THIS LINE ----------- */ $match = FALSE; $path = drupal_get_path_alias($_GET['q']); ?|\n)/', '/\\\\\*/', '/(^|\|)\\\\<front\\\\>($|\|)/'), array('|', '.*', '\1'. preg_quote(variable_get('site_frontpage', 'node'), '/') .'\2'), preg_quote($include, '/')) .')$/'; ?|\n)/', '/\\\\\*/', '/(^|\|)\\\\<front\\\\>($|\|)/'), array('|', '.*', '\1'. preg_quote(variable_get('site_frontpage', 'node'), '/') .'\2'), preg_quote($exclude, '/')) .')$/'; $match = TRUE; } } return $match; ?>
以上是关于使Drupal块对整个站点部分可见,但对特定的子部分或页面不可见的主要内容,如果未能解决你的问题,请参考以下文章