Table Of Contents

Previous topic


Next topic

World Clock

Hello World

This example will walk you through the steps of developing a simple “Hello World” extension on Vtiger 6 Framework.


  • Vtiger 6 installed on your server (assuming it would be used for development).
  • PHP CLI is setup to be invoked from the command prompt or terminal.
  • Gone through module development docs: Develop Extensions For Vtiger


  • <vtigercrm> - root-directory / document root where Vtiger 6 is installed.
  • http://<vtigercrm> - web entry access.


You can download “” from here.

Step 1: Create files

Switch to your working directory (say.. Desktop) and create the following files.


Step 2: manifest.xml

Edit manifest.xml and fill in basic information required for getting the extension installed in Vtiger.

<?xml version="1.0"?>
        <label>Hello World</label>

Step 3: Module Class

Update the module class file (modules/HelloWorld/HelloWorld.php).

class HelloWorld {}


It is recommended to have this file - although its blank will be useful later.

Step 4: View Class

Edit modules/HelloWorld/views/List.php


class HelloWorld_List_View extends Vtiger_Index_View {

        public function process(Vtiger_Request $request) {
                $viewer = $this->getViewer($request);
                $viewer->view('List.tpl', $request->getModule());



Default entry for the module from the menu is set to List View. We can customize this for every module.

Step 5: View template

Edit templates/List.tpl

<h1>{'Hello World'|vtranslate:$MODULE}</h1>

Step 6: Default i18n

Edit languages/en_us/HelloWorld.php


$languageStrings = array(
        'Hello World' => 'Hello World!',
        'LBL_WELCOME' => 'A very warm welcome to you'


Add all the string constants used by the module - required for i18n support.

Step 7: Package files

zip -r manifest.xml modules/HelloWorld/HelloWorld.php modules/HelloWorld/views/List.php languages/en_us/HelloWorld.php templates/List.tpl

Refer to Package Structure

Step 8: Install in Vtiger

You can import through Module Manager UI.


Importing through CLI script is given below.

cd <vtigercrm>
php -f ImportHelloWorld.php

ImportHelloWorld.php should use vtlib API to import the package.


require_once 'vtlib/Vtiger/Module.php';
require_once 'vtlib/Vtiger/Package.php';

$Vtiger_Utils_Log = true;

$package = new Vtiger_Package();
$package->import('/path/to/'); // Can be any-where on your server.

The module is now installed and ready, you can find it under All > Tools section.