Using a taxonomy field as the first field and Rewriting the output of the field the replacement patterns doesn't work.
The view outputs:
[tid-tid] == The taxonomy term ID for the term.
[tid-name] == The taxonomy term name for the term.
[tid-vid] == The vocabulary ID for the vocabulary the term belongs to.
[tid-vocabulary] == The name for the vocabulary the term belongs to.
Demonstration view to recreate this problem (require that you have some terms):
$view = new view;
$view->name = 'taxonomy_replacement_patterns';
$view->description = 'An example view to demonstrate that replacement patterns doesn\'t work on taxonomy terms field when it\'s the first field.';
$view->tag = 'demo';
$view->view_php = '';
$view->base_table = 'node';
$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(
'tid' => array(
'label' => 'All terms',
'alter' => array(
'alter_text' => 1,
'text' => '[tid] == Taxonomy: All terms<br />
[tid-tid] == The taxonomy term ID for the term.<br />
[tid-name] == The taxonomy term name for the term.<br />
[tid-vid] == The vocabulary ID for the vocabulary the term belongs to.<br />
[tid-vocabulary] == The name for the vocabulary the term belongs to.',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'type' => 'separator',
'separator' => ', ',
'link_to_taxonomy' => 0,
'limit' => 0,
'vids' => array(
'1' => 0,
),
'exclude' => 0,
'id' => 'tid',
'table' => 'term_node',
'field' => 'tid',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
));
$handler->override_option('access', array(
'type' => 'none',
));
$handler->override_option('cache', array(
'type' => 'none',
));
$handler->override_option('items_per_page', 0);
$handler->override_option('style_plugin', 'table');
$handler->override_option('style_options', array(
'grouping' => '',
'override' => 1,
'sticky' => 0,
'order' => 'asc',
'columns' => array(
'tid' => 'tid',
),
'info' => array(
'tid' => array(
'separator' => '',
),
),
'default' => '-1',
));
Comments
Comment #1
merlinofchaos commentedComment #2
ptrl commentedSeems to work fine over here, thanks!
Comment #3
mo6Works like a charm for http://drupal.org/node/657272
Comment #4
merlinofchaos commentedCommitted to all branches.