Bunun için Hit kullanmak istiyorsunuz.
Başlatmak için Bu Görünümü ithal
$view = new view;
$view->name = 'taxonomy_terms2';
$view->description = '';
$view->tag = '';
$view->view_php = '';
$view->base_table = 'term_data';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('fields', array(
'name' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'link_to_taxonomy' => 0,
'exclude' => 1,
'id' => 'name',
'table' => 'term_data',
'field' => 'name',
'relationship' => 'none',
),
'phpcode' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'value' => '<?php
$term_link = \'taxonomy/term/\'.$data->tid;
if (arg(0)==\'node\') { // If we\'re on a node, get the node\'s term and compare it to this term
$node = node_load(arg(1));
foreach ($node->taxonomy as $term) {
if ($data->tid == $term->tid) {
$extra_class = "active-term";
}
}
} else if (arg(0)==\'topic\') { // If we\'re on a view, compare the first two arguments of the view\'s alias to the term\' alias
if(drupal_lookup_path(\'alias\', $term_link) == arg(0) . \'/\' . arg(1)) {
$extra_class = "active-term";
}
}
print l($data->term_data_name, $term_link, array(\'attributes\' => array(\'class\' => $extra_class)));
?>',
'exclude' => 0,
'id' => 'phpcode',
'table' => 'customfield',
'field' => 'phpcode',
'relationship' => 'none',
),
));
$handler->override_option('sorts', array(
'weight' => array(
'order' => 'ASC',
'id' => 'weight',
'table' => 'term_data',
'field' => 'weight',
'relationship' => 'none',
),
));
$handler->override_option('filters', array(
'vid' => array(
'operator' => 'in',
'value' => array(),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'vid',
'table' => 'term_data',
'field' => 'vid',
'relationship' => 'none',
'override' => array(
'button' => 'Override',
),
),
));
$handler->override_option('access', array(
'type' => 'none',
));
$handler->override_option('cache', array(
'type' => 'none',
));
$handler->override_option('footer_format', '5');
$handler->override_option('footer_empty', 0);
$handler->override_option('style_plugin', 'list');
$handler->override_option('style_options', array(
'grouping' => '',
'type' => 'ul',
));
$handler = $view->new_display('block', 'Block', 'block_1');
$handler->override_option('filters', array(
'vid' => array(
'operator' => 'in',
'value' => array(
'49' => '49',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'vid',
'table' => 'term_data',
'field' => 'vid',
'relationship' => 'none',
'override' => array(
'button' => 'Use default',
),
),
));
$handler->override_option('block_description', '');
$handler->override_option('block_caching', -1);
Sonra sadece sizin kelime almak