用于在URL别名更改上更改Drupal站点名称

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了用于在URL别名更改上更改Drupal站点名称相关的知识,希望对你有一定的参考价值。

simple preprocess function to alter the site name depending on the section of the site
  1. function YOURTHEME_preprocess_page(&$variables, $hook) {
  2. if (theme_get_setting('toggle_name')) {
  3. $path = drupal_get_path_alias();
  4. if (drupal_match_path($path, 'one*')) {
  5. $variables['site_name'] = filter_xss_admin('Site Name One');
  6. } else if (drupal_match_path($path, 'two*')) {
  7. $variables['site_name'] = filter_xss_admin('Site Name Two');
  8. } else if (drupal_match_path($path, 'three*')) {
  9. $variables['site_name'] = filter_xss_admin('Site Name Three');
  10. }
  11. }
  12. }

以上是关于用于在URL别名更改上更改Drupal站点名称的主要内容,如果未能解决你的问题,请参考以下文章