tripal_core_customize.tpl.php 5.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <p>Tripal was designed to allow for maiximum customization of content and the look-and-feel of the site. By default,
  2. Tripal provides a suite of Drupal style templates that provide a generic presentation of data from a Chado database.
  3. There are many options for customizing the look and feel of Tripal. Some customizations can be done without any
  4. programming whatsoever. However, for advanced customizations, Tripal provides a robust API to allow a programmer
  5. to easily interact (select, update, delete, insert) data from a Chado database in whatever custom way desired.</p>
  6. <li><p><b>Integration with Drupal Views</b>: <a href="http://drupal.org/project/views">Drupal Views</a> is
  7. a powerful tool that allows the site administrator to create lists or basic searching forms of Chado content.
  8. It provides a graphical interface within Drupal to allow the site admin to directly query the Chado database
  9. and create custom lists without PHP programming or customization of Tripal source code. Views can also
  10. be created to filter content that has not yet been synced with Druapl in order to protect access to non
  11. published data (only works if Chado was installed using Tripal). If you have Views installed and enabled
  12. You can see a list of available pre-existing
  13. Views <a href="' . url('admin/build/views/') ?>">here</a>, as well as create your own. All Chado tables have
  14. been exposed to Drupal Views</p></li>
  15. <h3>Customizations Without Programming</h3>
  16. <p>There are several ways to customize the look-and-feel for the way Chado data is presented through Tripal.
  17. Below is a description of several methods. These methods may be used in conjunction with one another to
  18. provide fine-grained control.</p>
  19. <ul>
  20. <li><p><b>Integration with Drupal Panels</b>: <a href="http://drupal.org/project/views">Drupal Panels</a>
  21. allows for customization of a page layout. Tripal comes with pre-set layouts for project pages. However,
  22. Panels become useful if you prefer a layout that is different from the pre-set layouts. Chado content
  23. is provided to Panels in the form of Drupal "blocks" which you can then place anywhere on a page using the
  24. Panel\'s GUI.</p></li>
  25. <li><p><b>Drupal\'s Content Construction Kit (CCK)</b>: the
  26. <a href="http://drupal.org/project/cck">Content Construction Kit (CCK) </a> is a powerful way to add non-Chado content
  27. to any page without need to edit template files or knowing PHP. You must first download and install CCK.
  28. With CCK, the site administartor can create a new fields to appear on any Tripal node page.
  29. A field added by CCK will appear in the form when editing to allow users to manually enter the appropriate
  30. text. These field values are not stored in Chado, but will appear on the page when saved.
  31. If you are using the default themeing provided by Tripal, then it is better to create the CCK element,
  32. indicate that it is not to be shown (using the CCK interface), then manually add the new fields
  33. where desired by editing the templates (see section below about customizing through programming).
  34. If using Panels, the CCK field can be added to the location desired using the Panels interface.</p></li>
  35. <li><p><b>Adding Links to the "Resources" Sidebar</b>: You can add new items to the resources side-bar of any Tripal node using the
  36. <a href="http://drupal.org/project/cck">Content Construction Kit (CCK) </a>module and adding new field types to Tripal node types. Instructions for adding these fields can be found
  37. on the <?php l('Tripal v1.0 Tutorial', 'http://www.gmod.org/wiki/Tripal_Tutorial_(v1.0)#Adding_Additional_Resources')?> </p>
  38. </li>
  39. </ul>
  40. <h3>Customizations Through Programming</h3>
  41. <ul>
  42. <li><p><b>Adding Links to the "Resources" Sidebar</b>: If you use the pre-set default Tripal layout for theming, you
  43. will see a "Resources" sidebar on each page. The links that appear on the sidebar are automatically generated
  44. using Javascript for all of the project "Blocks" that appear on the page. If you want to add additional links
  45. (e.g. a link to a views table showing all features of the current project) and you want that link to appear in the
  46. "Resources" sidebar, simply edit the Drupal Node Template (as described above) and add the link to the
  47. section at the bottom of the template file where the resources section is found.</p></li>
  48. <li><p><b>Editing Templates and Creating Custom Extension Modules</b>:There are several ways to customize the look-and-feel
  49. for the way Chado data is presented through Tripal.
  50. See the <a href="http://www.gmod.org/wiki/Tripal_Developer's_Handbook">Developers Handbook</a> for further infromation.
  51. </p></li>
  52. <li><p><b>Sharing your customizations</b>: If you create a custom extension module that uses the Tripal API in
  53. accordance with the instructions in the Developers Handbook you can share your modules with other Tripal users.
  54. To share you module, you must first create a project account with Drupal and upload your extension module there.
  55. Next, subscribe to the <a href="https://lists.sourceforge.net/lists/listinfo/gmod-tripal-devel">Tripal Developer's Mailing List
  56. </a> and send an email to the group indicating you have a new extension module and would like to share it. A list of
  57. extension modules that properly follow the Tripal API will be listed on the Tripal website for others to easily find.</p></li>
  58. </ul>