Drupal development

From Things and Stuff Wiki
Jump to navigation Jump to search


Framework architecture

An entity is a kind of content stack. The entity base table is tied to fields using bundles. Entity types include node, comment, taxonomy term, user profile, organic group, etc. Fields are used to store and display various data types and can be reused. Entity types and fields can be saved as bundles (i.e., types of node).

hook_entity_info - "Inform the base system and the Field API about one or more entity types."

Themes

Templates

Core templates

Forms

For beyond basic content types field layouts;

function milk_form_alter(&$form, &$form_state, $form_id) {
  if ($form_id == 'contact_node_form') {
    $form['actions']['submit'] = array(
        '#type' => 'submit',
        '#value' => t('Send'),
    );
  }
}

JavaScript

<?php
  drupal_add_js(drupal_get_path('theme', 'mytheme') .'/my_js_file.js', 'theme');
?>

Other

*1*3*5*7*9*11*14*17*20*23*26*29*32*35*38*41*44*47*50*53*56*59*62*65*68

  • 71*74*77*80*83*86*89*92*95*98*101*105*109*113*117*121*125*129*133*137*141*145*149*153