如何预处理特定于 custom.tpl.php 的 $variables?
我有一个 hook_preprocess_node 来实现 theme_hook_suggestions 如下
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) {}
但它似乎没有用。