How can I print hello in Drupal?
satya - Wednesday, June 08, 2011 10:40:05 AM
At a highlevel this involves
create a module
.info file
.module file
Create a path to respond to
use a menu hook to do this
menu hook will have a php call back
Create a php function
write the callback function
return an html string
See the result
The string will showup in the content area of the page
This idea can be extended to use render arrays.
satya - Wednesday, June 08, 2011 10:41:34 AM
You can see an example of this here
satya - Wednesday, June 08, 2011 10:55:12 AM
Here is how you do this using a render array
create a module
.info file
.module file
Create a path to respond to
use a menu hook to do this
menu hook will have a php call back
Create a php function
write the callback function
return a php data array
identify in the data array the render function
Register the render function
in the module theme hook register the render function
write the render function
write the render function
retrieve the data to render
return html string
See the result
The string will showup in the content area of the page