Create your first "Hello World" Drupal 7 module with the following steps.
- Create a folder called helloworld in sites/all/modules/custom
- Create a helloworld.info file
- Create a template file page-helloworld.tpl.php in your theme directory
- Enable your module at http://domain.com/admin/build/modules
- Visit http://domain.com/helloworld
This belongs into your helloworld.info file:
; $Id$ name = helloworld description = Reinholds Hello World module package = Reinholds modules core = 7.x files[] = helloworld.module
The helloworld.module file
<?php function helloworld_menu(){ $items = array(); $items['helloworld'] = array( 'title' => t('Hello world'), 'page callback' => 'helloworld_output', 'access arguments' => array('access content'), ); return $items; } /* * Display output */ function helloworld_output() { header('Content-type: text/plain; charset=UTF-8'); header('Content-Disposition: inline'); return 'helloworld'; } ?>
The theme template file page-helloworld.tpl.php
<?php print $content; ?>
Comments · 13
Drupal Development Company
Drupal Hosting I Drupal Cloud Hosting
Once i have got unseccess in development of this modules when i was new in the industry and took help from Drupal Web Developer for complete that task. But this time i seen this so thought i was supposed to do that at that time.
psdtodrupaldeveloper.com
PHP Shopping Cart
graphics design
open source software
graphic design portfolio
responsive themes
drupal themes
graphic design portfolio examples
design portfolio
open source softwares
open source database
best graphic design
Drupal for Education
Magento Development Company Bangalore | Drupal Development Company Bangalore
Post a Comment