【发布时间】:2015-11-23 13:17:39
【问题描述】:
我是 drupal 核心开发的新手,任何帮助将不胜感激。 I have a tab group from content type hidden from anonymous users (by default) when the field content within the tab is empty, how do I hide this tab when login in editors are viewing the same content.
这是我迄今为止在 node.inc 中使用 template_preprocess_node 所做的事情
function template_preprocess_node__event(&$variables, $hook)
{
// kpr($variables);
$node = $variables['node'];
// kpr($node);
$custom_tab = field_get_items('node', $variables['node'], 'field_route_text');
$custom_tab = (!empty($custom_tab)) ? kpr ('not empty from node') : kpr('empty from node');
// jQuery UI accordion lib
drupal_add_library('system', 'ui.accordion');
}
【问题讨论】: