Best practice for incluiding static content in a drupal site

131 views
Skip to first unread message

Rick Hurst

unread,
Dec 6, 2007, 10:50:10 AM12/6/07
to bristol...@googlegroups.com
I have a some standalone php pages that I want to be displayed within
the body area of drupal template so that it is Drupal aware. I was
thinking of just creating pages and adding the files as includes in a
php block in the body, but is there a better way? The only other way I
can think is to create a drupal module, but it's handy having these
files working also as standalone pages.

--
Rick Hurst, Web developer, Bristol, England
http://www.rickhurst.co.uk

jnorton

unread,
Dec 7, 2007, 6:19:50 AM12/7/07
to Bristol Drupal Users
Hey Rick,

I have the exact code in my Pro Drupal development book at home, I can
look it up for you tomorrow if you are still stuck.

From what I remember you just need to include the following two
statements in your PHP file:

include_once "includes/bootstrap.inc";
include_once "includes/common.inc";

Basically from what I remember, the page is secured by utilizing the
bootstrap process and then variables are exposed to the page via
common.inc??

The book is here: http://www.apress.com/book/view/9781590597552. And
the chapter you want to look at is the one on security.

Cheers,

Justin.
Reply all
Reply to author
Forward
0 new messages