Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Drupal 7 Drupal 7未使用模板建议_Drupal 7_Drupal Theming - Fatal编程技术网

Drupal 7 Drupal 7未使用模板建议

Drupal 7 Drupal 7未使用模板建议,drupal-7,drupal-theming,Drupal 7,Drupal Theming,我已在[themename]\u preprocess\u page函数中将以下内容添加到我的template.php文件中: <?php if ($variables['is_front']) { $variables['theme_hook_suggestions'] = array(); $variables['theme_hook_suggestions'][] = 'page__index'; } if (isset($variables['no

我已在[themename]\u preprocess\u page函数中将以下内容添加到我的template.php文件中:

<?php
  if ($variables['is_front'])
  {
    $variables['theme_hook_suggestions'] = array();
    $variables['theme_hook_suggestions'][] = 'page__index';
  }

  if (isset($variables['node'])) {
    // If the node type is "blog" the template suggestion will be "page--blog.tpl.php".
    $variables['theme_hook_suggestions'][] = 'page__'. str_replace('_', '--', $variables['node']->type);
  }

我在#drupal IRC频道上与很棒的人合作,发现了这个问题。不确定这是代码中的bug还是故意的——但是你不能用“索引”这个词来表示那些主题建议。我把内容类型的名称改为“主页”,瞧

我在#drupal IRC频道与一些很棒的人合作,发现了这个问题。不确定这是代码中的bug还是故意的——但是你不能用“索引”这个词来表示那些主题建议。我把内容类型的名称改为“主页”,瞧