This is a clever idea, but be warned that the embedded javascript is not likely to render or “include” properly, and unless you run this through an html filter likely to cause malformed html.  IIRC the data property returned includes all of the data including headers, html head, body tags css references etc.

 

Someone please correct me if I am wrong.

 

Dave

 


From: support-bounces@drupal.org [mailto:support-bounces@drupal.org] On Behalf Of DTH
Sent: Tuesday, June 21, 2011 3:47 PM
To: support@drupal.org
Subject: Re: [support] Integrating completely unrelated pages into Drupal

 

Maybe kludgy, but could be very quick to do depending on your structure: in a custom module:

 

/**

 * Implementation of hook_menu().

 */

 function example_menu() {

  

  $items['test/page'] = array(

    'title' => 'Test Page Title',

    'page callback' => 'test_page',

            'access arguments' => array('access content'), 

            'type'=>MENU_NORMAL_ITEM

  );

  

  return $items;

}

 

function test_page(){

            $request = drupal_http_request("http://www.example.com/pages/test.php");

            return $request->data;

}

 

 

Date: Tue, 21 Jun 2011 12:29:20 -0500
From: Scott Massey <scott.massey@gmail.com>
Subject: [support] Integrating completely unrelated pages into Drupal
To: support@drupal.org
Message-ID: <BANLkTik7m+C8r1-MrBdG1OG2zkgvxovQWA@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Hi!

I am about 6 months into Drupal and enjoy it immensely. I am putting
together a portfolio of some web development I have done and have several
pages of data visualiztions using php and a javascript library called
Protovis. If I want to bring that into drupal as a page, is there a way to
do that? There are library calls, jquery, etc. I am having trouble wrapping
my head around how to do it. I would like the pages to be a menu item that
opens a page within the drupal site. Here is an example of a page:
http://modernamericanman.com/ids499/protovis7.php

Thanks!

Scott