How to create your first dupal Module

Now i explain the simple and easy steps to create a first drupal module. Our first module will show simple text, format it, and display it as a block in the site’s layout. There are two important files that every module must have.

The first is .info file, and the second file is .module (dot-module) file, which is a PHP script file.


Important Files

1) Creating the .info and .module files
2) Creating a new module
3) Using basic hooks
4) Installing and configuring the module

A Place for the Module files

Go to the root directory –> sites –> all –> modules.
Create a folder name helloworld

.info File

.Module File

Installing a Module

Step #1: Enabling The Module


Displaying the Module’s Content


If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.

Recommended Posts:

Article Tags: , , , , , , ,