2009-02-19

Content page customization in Drupal

If you want to customize Content page (admin/content/node) in Drupal (on screen below) you can insert form altering hook:



  1. /** 
  2.  * Implementation of hook_form_alter(). 
  3.  */  
  4. function custom_form_alter(&$form$form_state$form_id) {   
  5.  if($form_id == 'node_admin_content') { // form overview name   
  6.   // available fields:  
  7.   // $form['admin']['title'][nid]  
  8.   // $form['admin']['name'][nid]  
  9.   // $form['admin']['username'][nid]  
  10.   // $form['admin']['status'][nid]  
  11.   // $form['admin']['language'][nid]  
  12.   
  13.   // or in simplest way  
  14.   echo "<pre>";  
  15.   print_r($form['admin']);  
  16.   echo "</pre>";  
  17.  }  
  18. }  

No comments: