views2

Weird Views2 sql for relationship

  1. SELECT node.nid AS nid,
  2.    node.title AS node_title,
  3.    node_data_field_pubmed_id.field_pubmed_id_value AS node_data_field_pubmed_id_field_pubmed_id_value,
  4.    node.type AS node_type,
  5.    node.vid A

Filter nodes by a taxonomy_content field with view argument accepting terms names and synonyms

  1. /**
  2.  * The following code is used as validator for a view argument to filter nodes having the passed
  3.  * term as value for a taxonomy_content field.

Fix for Setting view title when using a custom validator for a taxonomy_content field

  1. /**
  2.  * The previous code is the export of a view display which add a argument to filter nodes having a the passed term using name and synonyms
  3.  * as value for a taxonomy_content field.

Setting view title when using a custom validator for a taxonomy_content field

  1. $handler->override_option('arguments', array(
  2.   'field_category_value' => array(
  3.     'default_action' => 'not found',
  4.     'style_plugin' => 'default_summary',
  5.     'style_options' => array(),
  6.    

Code

  1. function hook_views_data() {
  2.  
  3.   /* first attempt */
  4.  
  5.  
  6.  
  7.   $data = array();
  8.   $data['byline']['group']  = t('Byline');
  9.   $data['byline']['join']['node'] = array(

Fix for theming rows in Views2

  1. <?php
  2. // $Id: views-view-fields.tpl.php,v 1.6 2008/09/24 22:48:21 merlinofchaos Exp $
  3. /**
  4.  * @file views-view-fields.tpl.php
  5.  * Default simple view template to all the fields as a row.
  6.  *

theming rows in Views2

  1. <?php
  2. // $Id: views-view-fields.tpl.php,v 1.6 2008/09/24 22:48:21 merlinofchaos Exp $
  3. /**
  4.  * @file views-view-fields.tpl.php
  5.  * Default simple view template to all the fields as a row.
  6.  *
Syndicate content