[development] Query about new page

Khalid Baheyeldin kb at 2bits.com
Fri Jul 31 15:10:47 UTC 2009

Drupal is a content management system. Any piece of content (node) is stored
in the database, because it is created by someone who has certain
permission, created on a certain date, can have comments, votes, points,
...etc. Can be organized in taxonomy, book, and the like.

You are better off converting the .php file that you talk about into a
Drupal module (.info and .module at a minimum), and having a hook_menu for
it to be called as a path, so instead of example.com/something.php, it would
only be example.com/something.

If you insist on having external PHP, it is best to bootstrap Drupal in them
and then use Drupal's API normally afterwards, so something.php will be

require_once './includes/bootstrap.inc';

// your code here

Having said that, if you have more than a few of these, or worse, you plan
to have a lot of HTML markup in them, then you are doing something wrong,
and not using Drupal correctly.

On Fri, Jul 31, 2009 at 1:49 AM, Ankur Jain <ankur.khicha at gmail.com> wrote:

> Hi ,
>            I am new to drupal and i want to create new page like abc.php
> but i don't want to create this page from admin section create content ->
> page / story ... bco'z it save the page into database ... i want to create
> new php page by my own and then let say call this from one of the menu item
> ( on click of the menu ) .. how can i do that ...
> and also wanted to know why drupal is saving all the page in database ...
> is for some optimization or achieve some functionality.
> ankur

Khalid M. Baheyeldin
2bits.com, Inc.
Drupal optimization, development, customization and consulting.
Simplicity is prerequisite for reliability. --  Edsger W.Dijkstra
Simplicity is the ultimate sophistication. --   Leonardo da Vinci
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.drupal.org/pipermail/development/attachments/20090731/c3759a3b/attachment.htm>

More information about the development mailing list