• drupal 7
  • Tips and Tricks for Drupal 7

    Four months ago the official release of Drupal hit the web. Within that time frame a lot of exciting developments have happened within the Drupal community most notably version 3 of Views which now ships with a more straight forward user interface in comparison to Views 2.

    Other honourable mentions include the Entity API, only avaiable for Drupal 7, which extends the API of Drupal core for better module integration. The Media module is a module that supports image, audio and videos, it also includes plugins for media sites such as Youtube and Flickr. Apart from the exciting new modules that Drupal 7 provides, there are also some new functions in regard to the Drupal API. To help get over the learning curve we list a few useful tips that developers and designers may encounter on their Drupal journey.

    1. Regions in node.tpl.php This link discusses a simple way on how to embed regions inside your node.tpl.php file.

    2. Module Invoke If you are looking to place blocks within your content for example in node.tpl.php the following code can be implemented: $block = module_invoke('views', 'block_view', 'views-name');

    3. Taxonomy CSV import/export If you have quite a large number of taxonomy terms that needs to be imported this module is for you.

    4. Removing the subject field in the comment section 4.1 Copy comment-wrapper.tpl.php file from /www/MY-DRUPAL-DIRECTORY/modules/comment4.2 Place comment-wrapper.tpl.php in your theme folder /www/MY-DRUPAL-DIRECTORY/sites/all/themes/MY-THEME4.3 In your comment-wrapper.tpl.php file use the following code within your ?php tags: hide($content['comment_form']['subject']);

    5. Working with File Fields in Drupal 7 Great video explaining how fields work in Drupal 7 as well as file management.

    6. Drupal 7 learning curve aritcle by Venture Web Great set of tips and tricks, ideally for developers

    7. Printing user profile fields 7.1 Copy user-profile.tpl.php file from /www/MY-DRUPAL-DIRECTORY/modules/user7.2 Place user-profile.tpl.php in your theme folder /www/MY-DRUPAL-DIRECTORY/sites/all/themes/MY-THEME7.3 In your user-profile.tpl.php file use the following code within your ?php tags: print render($user_profile['field_NAME'])

    You May Also Like

    editors choice