I'm working on a site where there will be several admin pages that have intense logic in them. Let's take an example. I want a page that lists certain nodes and allows you to add or remove them, or do other actions on them.
Now, I can create a normal page in Drupal and select the input filter as "php code" and then just add the following line:
<?php executeTheCodeThatDoesEverythingForThisPage(); ?>
And I can put this method in a module.
However, this is not ideal, as a DB call is still made to find out what method must be called. I want to:
- Entirely skip the DB call
- Have a folder, e.g. pages, that stores all my custom pages, e.g. aboutus.php, mystuff.php
- Still have access to all the drupal functions in this file
Anybody know how I can do this?
<<-- EDITED -->>
If I can't skip the DB query, can someone tell me the best way to include data from a static php file? Is there a module for this, or should I just add the following code:
include_once "myFile.php";