simplenews モジュールを使用して、ポスト simplenews モジュールの複数のサブスクリプションにブロック セクションを提供していますが、デザインのレイアウトを変更する必要があります。
1 に答える
1
これは「function template_preprocess_block(&$variables)」のコードの一部です。
$variables['theme_hook_suggestions'][] = 'block__' . $variables['block']->region;
$variables['theme_hook_suggestions'][] = 'block__' . $variables['block']->module;
// Hyphens (-) and underscores (_) play a special role in theme suggestions.
// Theme suggestions should only contain underscores, because within
// drupal_find_theme_templates(), underscores are converted to hyphens to
// match template file names, and then converted back to underscores to match
// pre-processing and other function names. So if your theme suggestion
// contains a hyphen, it will end up as an underscore after this conversion,
// and your function names won't be recognized. So, we need to convert
// hyphens to underscores in block deltas for the theme suggestions.
$variables['theme_hook_suggestions'][] = 'block__' . $variables['block']->module . '__' . strtr($variables['block']->delta, '-', '_');
テーマの .tpl ファイル、またはテーマの基本的な block.tpl.php として提案の一部を作成できます。
于 2013-09-27T10:46:49.797 に答える