laceysanderson 65ea3d9ecc Tripal Natural Diverstiy Views Integration -added support for experiment, geolocation,reagent; also moved around stock handlers (Part I) 14 yıl önce
..
handlers f81983bebe Views handler for feature residues 14 yıl önce
README 680e07b8d0 Added views integration templates and instructions to all tripal modules 14 yıl önce
chado_feature.views.inc 733f3c597b Added support for internal chado to views (including joining to node table) for organism, library, feature & analysis 14 yıl önce
feature.views.inc 65ea3d9ecc Tripal Natural Diverstiy Views Integration -added support for experiment, geolocation,reagent; also moved around stock handlers (Part I) 14 yıl önce
template.node_join.views.inc 680e07b8d0 Added views integration templates and instructions to all tripal modules 14 yıl önce
template.table_defn.views.inc a2ce6c7498 Update to views template files 14 yıl önce

README


This directory contains all additional views code needed to integrate this module with views2.

FILE/FOLDER DESCRIPTIONS
---------------------------
.views.inc:
contains a single function retrieve__views_data()
which describes that table to views. This function is called by
tripal_feature_views_data() in ../tripal_feature.views.inc.
For more information on the form of this data array look up the
views2 documentation for hook_views_data()
-http://views2.logrus.com/doc/html/index.html

handlers/
Each file contained within this folder defines a views handler. Only custom
handlers are included in this folder and each must be described in
hook_views_handlers() in ../tripal_feature.views.inc.
A views handler does one of the following:
1) describe the type of a field and how it should be displayed
2) describe a method to sort this field
3) describe a method to filter this field


STANDARDS TO FOLLOW
---------------------------

1. All table definition files should be named tablename.views.inc
2. All handlers should be in a handlers sub-directory and follow the naming convention of
views handlers (ie: views_handler_field/filter/sort_handlername.inc )

Views Table Definitions:
- Please use the template files provided whenever you are describing a new table to views.
For any table in chado simply copy template.table_defn.views.inc to tablename.views.inc and
follow the instructions listed at the top of the template file.
- ONLY ONE TABLE DEFINITION PER FILE
- To join a chado table to it's drupal node simply copy template.node_join.views.inc to
basetablename.views.inc and replace all XXX with basetablename.

NOTE: Creating the table definition file is not enough. You also need to call the
retrieve_XXX_views_data() function from ../tripal_feature.views.inc:tripal_feature_views_data()
by adding the following line:
$data = array_merge($data, retrieve_XXX_views_data());
to the function and including the file directly above the function (blow the function
header by adding:
require_once('views/XXX.views.inc');