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; ?>
Thanks for sharing custom module in php.
ReplyDeleteDrupal Development Company
Drupal has a well established reputation for running enterprise-level websites such as The Economist©, FedEx© and The White House. Drupal has an excellent vocabulary and a tag management core module with a better caching system. This is a key requirement to surpass the high volume of traffic.
ReplyDeleteDrupal Hosting I Drupal Cloud Hosting
Thanks for posting the tips.
ReplyDeleteOnce 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.
Drupal development is one of the best module in CMS for theme development. You mentioned the details stpes, it help the needy.
ReplyDeletepsdtodrupaldeveloper.com
I recently came across your blog and have been reading along. I think I will leave my first comment. I don’t know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often.
ReplyDeletePHP Shopping Cart
Nice Post.. Hey you can create you custom module with Drupal Development. you can create your website in affordable price. More info visit on http://markupzone.com/psd-to-drupal.html
ReplyDeleteGreat post and its a great discussion on Drupal custom module.Drupal is a powerful module in open source content management system. Anyone can freely join with us for Software development in Drupal, Joomla and wordpress, software design, software application development in affordable price. More info visit on http://www.datainfovision.com
ReplyDeleteDatabase package. secure and quick downloads from the biggest Open supply applications and package directory - codeshop.co .
ReplyDeletegraphics 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 is used to built truly flexible E Commerce websites and applications. It stack provides one click solution for installation. we can run in own server drupal by virtual machines and download installer. Professional Website Design Company Bangalore
ReplyDeleteChoosing your CMS is very essential moving forward. I am a big fan of Drupal. Because Considering the leading websites like the UN use Durpal, I chose Drupal For a development platform I always use GetPantheon including features like fast cache responses which content management system do you prefer?
ReplyDeleteDrupal for Education
Thanks for sharing such useful information... I think this is really a very nice post. Thanks for the great content!! find Custom Drupl Development company
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteTerrific paintings! This is the type of information that should be allocated across the net. Disgrace on the search engines for no more positioning this post higher! Come on over and analyze out my website. Thanks
ReplyDeleteMagento Development Company Bangalore | Drupal Development Company Bangalore