23/07/2015, 00:45
|
| | Fecha de Ingreso: enero-2013
Mensajes: 48
Antigüedad: 11 años, 11 meses Puntos: 0 | |
Respuesta: Comparación de campos en Views no funciona Parte 2
/* Campo: Término de taxonomía: ID del término */
$handler->display->display_options['fields']['tid']['id'] = 'tid';
$handler->display->display_options['fields']['tid']['table'] = 'taxonomy_term_data';
$handler->display->display_options['fields']['tid']['field'] = 'tid';
$handler->display->display_options['fields']['tid']['relationship'] = 'term_node_tid';
$handler->display->display_options['fields']['tid']['label'] = '';
$handler->display->display_options['fields']['tid']['exclude'] = TRUE;
$handler->display->display_options['fields']['tid']['element_label_colon'] = FALSE;
/* Campo: Contenido: etiquetas consolas */
$handler->display->display_options['fields']['field_etiquetas_consolas']['id'] = 'field_etiquetas_consolas';
$handler->display->display_options['fields']['field_etiquetas_consolas']['table'] = 'field_data_field_etiquetas_consolas';
$handler->display->display_options['fields']['field_etiquetas_consolas']['field'] = 'field_etiquetas_consolas';
$handler->display->display_options['fields']['field_etiquetas_consolas']['label'] = '';
$handler->display->display_options['fields']['field_etiquetas_consolas']['exclude'] = TRUE;
$handler->display->display_options['fields']['field_etiquetas_consolas']['element_label_colon'] = FALSE;
/* Campo: Contenido: Compañia */
$handler->display->display_options['fields']['field_compania_consola']['id'] = 'field_compania_consola';
$handler->display->display_options['fields']['field_compania_consola']['table'] = 'field_data_field_compania_consola';
$handler->display->display_options['fields']['field_compania_consola']['field'] = 'field_compania_consola';
$handler->display->display_options['fields']['field_compania_consola']['label'] = '';
$handler->display->display_options['fields']['field_compania_consola']['exclude'] = TRUE;
$handler->display->display_options['fields']['field_compania_consola']['element_label_colon'] = FALSE;
/* Campo: Contenido: Título */
$handler->display->display_options['fields']['title']['id'] = 'title';
$handler->display->display_options['fields']['title']['table'] = 'node';
$handler->display->display_options['fields']['title']['field'] = 'title';
$handler->display->display_options['fields']['title']['label'] = '';
$handler->display->display_options['fields']['title']['exclude'] = TRUE;
$handler->display->display_options['fields']['title']['element_label_colon'] = FALSE;
/* Campo: Contenido: Nid */
$handler->display->display_options['fields']['nid']['id'] = 'nid';
$handler->display->display_options['fields']['nid']['table'] = 'node';
$handler->display->display_options['fields']['nid']['field'] = 'nid';
$handler->display->display_options['fields']['nid']['label'] = '';
$handler->display->display_options['fields']['nid']['exclude'] = TRUE;
$handler->display->display_options['fields']['nid']['element_label_colon'] = FALSE;
/* Criterio de ordenación: Global: Aleatorio */
$handler->display->display_options['sorts']['random']['id'] = 'random';
$handler->display->display_options['sorts']['random']['table'] = 'views';
$handler->display->display_options['sorts']['random']['field'] = 'random';
/* Filtro contextual: Término de taxonomía: Nombre */
$handler->display->display_options['arguments']['name']['id'] = 'name';
$handler->display->display_options['arguments']['name']['table'] = 'taxonomy_term_data';
$handler->display->display_options['arguments']['name']['field'] = 'name';
$handler->display->display_options['arguments']['name']['relationship'] = 'term_node_tid';
$handler->display->display_options['arguments']['name']['default_action'] = 'default';
$handler->display->display_options['arguments']['name']['exception']['title'] = 'Todo(s)';
$handler->display->display_options['arguments']['name']['default_argument_type'] = 'taxonomy_tid';
$handler->display->display_options['arguments']['name']['default_argument_options']['node'] = TRUE;
$handler->display->display_options['arguments']['name']['default_argument_options']['vocabularies'] = array(
'companias_consolas' => 'companias_consolas',
);
$handler->display->display_options['arguments']['name']['summary']['number_of_records'] = '0';
$handler->display->display_options['arguments']['name']['summary']['format'] = 'default_summary';
$handler->display->display_options['arguments']['name']['summary_options']['items_per_page'] = '25';
$handler->display->display_options['arguments']['name']['limit'] = '0';
/* Criterios de filtrado: Contenido: Publicado */
$handler->display->display_options['filters']['status']['id'] = 'status';
$handler->display->display_options['filters']['status']['table'] = 'node';
$handler->display->display_options['filters']['status']['field'] = 'status';
$handler->display->display_options['filters']['status']['value'] = 1;
$handler->display->display_options['filters']['status']['group'] = 1;
$handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
/* Criterios de filtrado: Global: Comparación de campos */
$handler->display->display_options['filters']['fields_compare']['id'] = 'fields_compare';
$handler->display->display_options['filters']['fields_compare']['table'] = 'views';
$handler->display->display_options['filters']['fields_compare']['field'] = 'fields_compare';
$handler->display->display_options['filters']['fields_compare']['operator'] = '<>';
$handler->display->display_options['filters']['fields_compare']['right_field'] = 'field_etiquetas_consolas';
$handler->display->display_options['filters']['fields_compare']['left_field'] = 'tid';
/* Criterios de filtrado: Contenido: Imágen de la Consola (field_imagen_consola:title) */
$handler->display->display_options['filters']['field_imagen_consola_title']['id'] = 'field_imagen_consola_title';
$handler->display->display_options['filters']['field_imagen_consola_title']['table'] = 'field_data_field_imagen_consola';
$handler->display->display_options['filters']['field_imagen_consola_title']['field'] = 'field_imagen_consola_title';
$handler->display->display_options['filters']['field_imagen_consola_title']['operator'] = '!=';
$handler->display->display_options['filters']['field_imagen_consola_title']['value'] = 'ficha_sin_imagen_8.gif';
/* Display: Page */
$handler = $view->new_display('page', 'Page', 'page');
$handler->display->display_options['path'] = 'consolas-misma-compania';
$translatables['consolas_misma_compania'] = array(
t('Master'),
t('Consolas misma compania'),
t('más'),
t('Aplicar'),
t('Reiniciar'),
t('Ordenar por'),
t('Asc'),
t('Desc'),
t('término'),
t('.'),
t(','),
t('Todo(s)'),
t('Page'),
);
Pruebalo y a ver que tal, ya dirás como te ha ido, saludos! |