Riteish shah
Riteish shah

Reputation: 21

Custom page in drupal

hi i m new to drupal i want to know that how could i add my custom page for the display the some information which is come from databases, i have create that page in core php (for example information.php)but i want to add that page in drupal 7 how it is possible

looking for the quick and best reply

Upvotes: 0

Views: 968

Answers (1)

Bart
Bart

Reputation: 433

The quickest way would be to add a content type "Information" to your drupal site, rename your information.php file to node--information.tpl.php and use the Drupal Database API to get stuff from your database. Finally you'd want to put node--information.tpl.php in your theme/%themename/templates/ folder and add new content with the Content Type "Information".

The best way would be to make a new module. Build your menu structure and add a theming function that calls a template file. When calling the template file using theme(), pass along the data that needs to be displayed.

In addition you might want to check out the Custom Page module: http://drupal.org/project/custompage

Upvotes: 1

Related Questions