custom.tpl.php に固有の $variables を前処理するにはどうすればよいですか?
次のように theme_hook_suggestions を実装する hook_preprocess_node があります
function customtheme_preprocess_node(&$variables) {
$variables['theme_hook_suggestions'][] = 'node__' . $variables['type'] . '__' . $variables['view_mode'];
}
そして、node_ contentType __viewModeの HTML を返す関数
function customTheme_node__article__full($variables) {
$output = '';
//build output markups ....
$output .= render($variables['content']);
return $output;
}
上記の viewMode テーマを具体的に対象とする前処理関数が必要だとしましょう。
私が試してみました
function customeTheme_preprocess_node__article__full(&$variables) {}
しかし、うまくいかないようでした。