Добавить класс с названием словаря к тегу body
function your_module_preprocess_html ( & $vas ) { if ( arg ( 0 ) == 'taxonomy' && arg...
function bt_prev_next($current_node = NULL, $op = 'p', $type = 'news', $title_link = 'Предыдущая', $weight = false) { if ($op == 'p') { $sql_op = $weight == false ? '>' : '<'; $order = $weight == false ? 'ASC' : 'DESC'; } elseif ($op == 'n') { $sql_op = $weight == false ? '<' : '>'; $order = $weight == false ? 'DESC' : 'ASC'; } else { return NULL; } $query = db_select('node', 'n'); if($weight == true) { $query->leftJoin('nodehierarchy_menu_links', 'nml', 'n.nid = nml.nid'); $query->leftJoin('menu_links', 'ml', 'nml.mlid = ml.mlid'); $query->leftJoin('nodehierarchy_menu_links', 'nmll', 'ml.plid = nmll.mlid'); } $query->fields('n', array('nid', 'title')); $query->condition('n.type', $type); $query->condition('n.status', 1, '='); if($weight == true) { $query->condition('ml.weight', $current_node->nodehierarchy_menu_links[0]["weight"], $sql_op); $query->orderBy('ml.weight', $order); } else { $query->condition('n.nid', $current_node->nid, $sql_op); $query->orderBy('n.nid', $order); } $result = $query->range(0, 1)->execute(); foreach ($result as $data) { if (isset($data)) { if ($op == 'n') return l($title_link, "node/$data->nid", array( 'html' => TRUE, 'attributes' => array('class' => array('bt','portfolio-next'))) ); else if ($op == 'p') return l($title_link, "node/$data->nid", array( 'html' => TRUE, 'attributes' => array('class' => array('bt','portfolio-prev'))) ); } } }
<?php echo bt_prev_next($node,'p', 'news', 'Предыдущая новость', false);?> <?php echo l('Все новости', 'news', array('attributes' => array('class' => array('bt','portfolio-all'))))?> <?php echo bt_prev_next($node,'n', 'news', 'Следующая новость', false);?>