Friday, December 6, 2013

Drupal Questions

What is a Module in drupal ?
A module is software (code) that extends Drupal features and/or functionality. Drupal Supports – Core modules – included with the main download of Drupal, and you can turn on their functionality without installing additional software. Contributed modules are downloaded from the Modules download section of drupal.org, and installed within your Drupal installation. You can also create your own module – CustomModules” using PHP programming, and Drupal’s module API.

What modules do you always recommend and why?

  • Views - This module is essential in every website I build. It makes displaying lists of content very easy. If you want an image slideshow, a list of blog posts, a list of products, etc., views is the best place to start.
  • Panels - Panels gives you the ability to create custom pages easily. These custom pages can have multiple regions of content. For example, you may want to create a home page that has a Slideshow on the top, and a two column layout below.
  • Ctools - On its own, Ctools does not seem to do a lot. However, it is actually a very powerful framework if you begin developing your own modules. I have used Ctools in the past for developing multi-step forms, modal dialog boxes, and even multi-step forms inside of modal dialog boxes.
  • Token - Tokens are little snippets of text that can be used as replacement patterns. For example, if your website sends out emails and you want to add in the users name, or you want fill in a link path with a node id to provide a helpful link to content, tokens will save the day.
  • Pathauto - The Pathauto module is a necessity for any website that frequently adds new content. It is also especially important if you have a website that allows users to create content using content types. Pathauto simplifies creating clean and search engine friendly URLS for the various content you add to your site.
  • Webform - If you want to provide easy to fill out forms for the visitors of your site, the Webform module will help you out.
  • Rules - Drupal rules will allow you to set up condition actions.
  • Date - This is useful for allowing the easy selections of dates in content types (with a nice date popup). It also integrates nicely with the views module.
  • Quicktabs - Makes it easy to add tabbed content without having to write your own Javascript/Jquery. What more do I have to say?
  • Libraries - Makes organizing your various libraries of functionality easy (see Jquery UI above for an example).
  • Google Analytics - I don’t build a Drupal website without adding Google Analytics. This module makes it very simple. What gets measured, gets improved after all.
What are hooks in Drupal ?
hooks are drupal api code which allows module to interact with the Drupal core.
Drupal’s module system is based on the concept of “hooks”. A hook is a PHP function that is named foo_bar(), where “foo” is the name of the module (whose file name is thus foo.module) and “bar” is the name of the hook. Each hook has a defined set of parameters and call back functions to trigger functionality on specific event.  For example if you use form with submit button, on submit event you can have specific functionality.

No comments:

Post a Comment